BPM Admin—Using flex fields/mapped attributes

A user can have many tasks assigned. Let's say he wants to prioritize tasks and work on those tasks which he wants to access at that instant. You can create a custom column in the task list and the user can see these custom column values in the task list after logging into the Process workspace; they can then decide which task to access.

How will these column values be populated? These column values will be populated from the task payload itself. Say you have a businessanalyst user. You will create a custom attribute in a task list which displays Account name from the quote payload. Account name has values such as FusionNX, APJSales, USASales, and so on, and businessanalyst has priorities for the day and he/she just wants to work on account name FusionNX for the day.

You can achieve this by using flex fields. Human Workflow flex fields store and query use case specific custom attributes. These custom attributes typically come from the task payload values. Storing custom attributes in flex fields provides the following benefits:

  • They can be displayed as a column in the task listing
  • They can filter tasks in custom views and advanced searches
  • They can be used for a keyword-based search

How to do it...

I. Adding variables

  1. Log in to JDeveloper with the default role.
  2. Go to BPM navigator | Project | Business Catalog | Human tasks and click on BusinessAnalystUI.task.
  3. Click on the Data section to open the task editor.
  4. Click on the green plus (+) icon to add a data variable.
  5. Let the variable Type be string. Enter Parameter Name as VarAccountName and check Editable via worklist.
    How to do it...
  6. Click OK.
  7. Click on the SalesToContract process and go to the Business Analyst swimlane.
  8. Double-click on the BusinessAnalystReview Human Task.
  9. Go to the Implementation tab and edit the Data association.
  10. Enter a simple Expression quote.summary.accountname from the quote payload as input to the VarAccountName variable as shown in the following screenshot:
    How to do it...
  11. Click OK on the Data association dialog.
  12. Click OK on the Properties dialog too.
  13. When you have finished the preceding steps, click Save.
  14. Deploy the project as per Chapter 3, Process Deployment and Testing.

II. Creating flex fields for BusinessAnalystUI tasks

  1. Log in to Oracle BPM workspace as the WebLogic user.
  2. Click on the Administrator tab and in the Administration Area, click Public Flexfields.
  3. In the Create Flexfields section, click on the green plus (+) icon. This will open a label box.
  4. Create a label AccountName as shown in the following screenshot and click on the Create button to create it:
    How to do it...
  5. Check Edit mappings by task type and click on the browse button as shown in the following screenshot.
  6. Select the BusinessAnalystUI task from the list.
  7. You can select VarAccountName from the drop-down list as the Map Payload Attributes.
  8. Select the AccountName label in the text box adjacent to the Map Payload Attributes drop-down list.
    How to do it...
  9. Click on the Save button in the top-right corner.
  10. Click on the Home tab and go to Worklist Views section.
  11. Click on Inbox and click on the green plus (+) icon to add a user view.

    This will open a Create User View dialog.

  12. Enter Name as AccountNameBasedSearch.
  13. Select the BusinessAnalystUI task in Task Type and keep the defaults for the rest.
    How to do it...
  14. Click on the Display tab.
  15. Scroll through the Available column list and you will find the column label AccountName listed there.
  16. Add the column to the Selected section by clicking the> arrow.
    How to do it...
  17. Click OK.
  18. Initiate a process instance.
  19. Log in again to Oracle BPM as the WebLogic user.
  20. In the Worklist Views, you will find the custom view AccountNameBasedSearch.
  21. You will find AccountName as the column and FusionNX as the value.
    How to do it...
  22. You can log in to Oracle EM console and verify the value from the running process instance.

How it works...

Flex fields will store the custom attribute values coming from the task payload and make them available to the custom view. For the mapped attribute to get populated, administrators create mapped attribute mappings by specifying a label for the mapped attribute to be populated and map the payload attribute, which contains the data, to the label.

After the mapping is complete and a new task is initiated, the value of the payload is transferred to the mapped attribute that has just been mapped. Tasks initiated before the mapping do not contain the value in the mapped attribute. Only top-level, simple type attributes in the payload can be transferred to a mapped attribute.

These mappings are valid for a certain task type.

You have witnessed that the Human Task editor is used only when defining the payload for a task. All other operations are performed at runtime by the administrator.

There's more...

You created this custom view AccountNameBasedSearch in the Inbox earlier. And you have selected the BusinessAnalystUI task in the task type and kept the defaults for the rest.

You have noticed that there is a checkbox Add To Standard View, which you have kept as unchecked by default. You can create a custom view in Standard Views too.

Adding to a standard view

Follow these steps to create a standard view:

  1. Go to Oracle BPM workspace and log in as the WebLogic user.
  2. Go to the Worklist Views section.
  3. Click on Inbox and then click on the green plus (+) icon to add a user view.

    This will open a Create User View dialog.

  4. Enter Name as AccountNameFlex.
  5. Check Add To Standard View, to add this AccountNameFlex view to the standard view.
  6. Select BusinessAnalystUI task in the Task Type and keep the defaults for therest.
  7. Click OK.
  8. Log out of the WebLogic user.
  9. Run an instance on the process.
  10. Log in as BusinessAnalyst user in the Oracle BPM workspace.
  11. Go to Worklist Views and you can witness AccountNameFlex in Standard View.
  12. You will find the AccountName column and data from payload too.
    Adding to a standard view
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.97.202