Part 2 of this series focuses specifically on what you should consider when building business spaces used with business process definitions and Human services. Read Part 1 of this series to learn about Business Space and the Human Task Management widgets in general and in particular about the extent to which you can customize the user experience to specific user roles and scenarios.
Before working through the steps in this article, you should download the sample Order Handling process application provided with this article and import it into Process Center. This article takes you through the following aspects of using Business Space for business process definitions and explains the relevant modeling and configuration steps.
- Using Business Space
- Working with tasks
- Starting processes
- Initiating process actions
- Using business data and filters in lists
The sample process that is provided for download with this article is a simple Order Handling process, as shown in Figure 1. The only activity between the Start and the End step is a Human Service with a Coach for checking the order.
Figure 1. Sample Order Handling process
Working with processes and Human services using Business Space
When you access Business Space for the first time, you see the Getting Started page of the Welcome to Business Space space. The following section describe how you work with processes and Human Services.
Configure Business Space to use business process definition engine REST services
By default a profile in IBM Business Process Manager Advanced is configured so that Business Space uses the Federated REST services as process and task services. If you only interact with business process definition (BPD) instances and Human Services built with Process Designer, you can optionally use the business process definition engine REST services directly. This makes it easy to use your own saved searches from Process Portal in the Tasks and Processes list widgets. When using the Federated REST API, additional steps and considerations are necessary as explained in Part 3.
To change the REST endpoint, complete the following steps:
- Log on to the WebSphere administrative console.
- For a single server configuration, select Servers => WebSphere application servers and select your server.
- Click Business Space configuration in the Business
Integration section, and then REST service endpoint
registration. The list of endpoints contains process services
and task services, as shown in Figure 2. For both types of services,
select the Business process definition engine REST services.
Figure 2. REST endpoint configuration
- Click Apply and then Save.
Create a space to work with processes and tasks
To work with processes and tasks in Business Space, you need to create a space to hold the Human Task Management widgets. Space templates are provided to help you create a space. For example, the Interact with Processes and Tasks template creates a space with two pages that contain the Human Task Management widgets that are configured for different interaction scenarios.
To create a space, complete the following steps:
- Log in to Business Space. If you do not have a bookmark to the
Business Space portal, navigate to Process Portal or the Process
Center Console and manually change the link to
/BusinessSpace. For example, the URL might be http://localhost:9080/BusinessSpace, depending on your set-up.
- In the Business Space banner, select Actions => Create
Space. The Create Space window opens as shown in Figure 3.
Figure 3. Create a new space using a template
- Enter a name for the new space, and select the Interact with Processes and Tasks template. You can also choose a style for the space and an icon.
- Click Save.
You can now use the space you just created. The new space contains two pages: Initiate and Work with Tasks, and Check Status.
Initiate and Work with Tasks page
This page contains the following widgets:
- The Task Definitions widget contains all the Human Services that you can start.
- The Tasks widget shows all the tasks that are not yet closed and are assigned to you -- either already to you as user or to a participant group of which you are a member.
- The Task Information widget shows the Coach forms during initiation and completion of a task.
Figure 4 shows the Initiate and Work with Tasks page.
Figure 4. Initiate and Work on Tasks page
In the provided sample (see the Downloads section, the Task Definitions widget is empty because no Human Services are available yet. The Tasks widget shows some tasks from the Order Handling process that where started in Process Designer. The equivalent to the Run action in Process Portal is the Accept or Edit action in the widget.
- Accept is available if the task is still assigned to the participant group.
- Edit is available if the task is already assigned to you.
The Coaches are displayed in the Form tab of the Task Information widget.
Check Status page
This page, shown in Figure 5, shows all the processes. You can open them in the Process Information widget and see the corresponding tasks in the Tasks widget. The Process Information widget shows actions that can be performed on the process. These actions can be one of the following types:
- Configured actions: These are defined for each widget when the widget is configured. The space template contains the configured action Show for illustration. The action triggers a widget event, which does nothing until you define a custom widget to handle it.
- Modeled actions: These are ad hoc events that are modeled in Process Designer. For more information about ad hoc events, see Initiating process actions.
Because the sample BPD does not yet have any ad hoc events, there are no modeled actions.
Figure 5. Check Status page
Working with tasks
To work with a task in Business Space, you author your BPD in the same way as you are used to when running a task in Process Portal. In a nutshell, you complete the following steps:
- Add a lane and assign a participant group.
- Add an activity to the lane.
- Implement the activity as a Human Service.
- Build the Human Service and include Coaches, which are the forms that provide process-related data to users, as well as collect input from those users.
The Order Handling sample process includes a Check Order activity that is implemented as a Human Service with a single Coach. (See the Downloads section.)
There are two approaches to enable users to start a process. The user initiates the process and the first task is automatically assigned to the user to provide the relevant business data. This is a task like any other task assigned to the user and is typically shown in his or her in-box.
Alternatively, the user initiates the forms to provide the relevant business data. Once he or she submits the forms, the process is started immediately with business data. This approach ensures that no process instances without business data exist. Essentially you define an invocation task that starts the process.
In Business Space, the Task Definitions widget provides a list of invocation task definitions. The user selects a task definition, provides the input and submits it to start the process. To provide a Human Service that realizes this task definition, you complete the tasks described in the following sections in Process Designer.
Create an Undercover Agent to start a process from a service
You use an Undercover Agent to start a process from within a Human Service. Complete the following steps:
- Create a General System service with a name of your choice. The input
and output types of the service must match the input type of the Order
Handling BPD. Establish a direct sequence flow between the Start and
the End event, as shown in Figure 6.
Figure 6. Order Handling General System Service
- Create an Undercover Agent (UCA) with a name of your choice. The UCA
fires the event that starts the BPD. Select On Event as the
schedule type, and the General System service that you created
in step 1 as the attached service.
Figure 7. Order Handling Undercover Agent
- In the Order Handling BPD add a Start Message Event
step. On the Implementation tab, select the
Undercover Agent from step 2 as the attached UCA. Ensure that
Consume Message is checked and map the UCA output to the
input variables of the BPD. Figure 8 shows the completed
Figure 8. Start Message Event step
Create a Human Service to realize the task definition
Now that you have set up the UCA, you can model the Human Service to collect the user input and start the process using the UCA.
- Create a Human Service. Give the Human Service a name, for example,
Create Order. This name will be shown in the Task Definitions widget in Business Space,
- Expose the Human Service as a Startable Service and select a Participant Group that is allowed to start it.
- Add a Coach step to collect the process input, for example, customer information.
- Add an Invoke UCA step to start the process. As implementation,
select the UCA created in the previous task as the attached UCA. Map
the data collected using the Coach to the input of the UCA.
Figure 9. Create Order Human Service
Start a process in Business Space
You can now log in to Business Space and see the exposed Human Service in the Task Definitions widget.
- In the Task Definitions widget, select the Create
Order item and click Create. The Coach
associated with the Human Service opens in the Task information
Figure 10. Task Definitions widget with exposed Human Service
- Enter the required data, and click Create. The Undercover
Agent that starts a new process is triggered.
Figure 11. Create Order Human Service
Initiating process actions
You often have a need for users to be able to perform actions on a process. For example, when a customer calls to cancel his order, a call-center agent needs to cancel that specific Order Handling process.
To enable users to cancel the sample Order Handling process with confirmation required, complete the tasks in the following sections.
Add an ad hoc event to the BPD
To model the process action as an ad hoc event that you add to the Order Handling process, open the BPD in Process Designer and complete the following steps:
- Add an additional lane to the BPD and place a Start Ad Hoc event and an End Event in the lane.
- Place a Confirmation activity between the two events. Implement it as
a Human Service with a Coach. This allows the user to confirm the
cancellation. Figure 12 shows the new lane in the BPD.
Figure 12. Ad hoc event lane
- Select the Last User in Lane routing as shown in
Figure 13, so that the task is automatically routed to the user that
triggered the ad hoc event.
Figure 13. Task routing
Users must be authorized to see and perform process actions in Business Space. This access is controlled globally for the ACTION_INJECT_TOKEN Process Portal function.
Default access for Process Portal functions is set in the 99Local.xml configuration file. By default, only members of the tw_admins group are allowed to inject tokens into processes. To enable other groups, you need to change the configuration by overwriting the action policy in the 100Custom.xml file.
For the sample Order handling process, you simply remove the restriction, thus making the function available to all users.
- Open the Custom100.xml file at: PROFILE_HOME/config/cells/CELL_NAME/nodes/NODE_NAME/servers/SERVER_NAME/process-center/config for a Process Center server or PROFILE_HOME/config/cells/CELL_NAME/nodes/NODE_NAME/servers/SERVER_NAME/process-server/config for a Process Server server.
- Insert the following entries to remove the restricted access.
<server> <portal> <default-action-policy> <!-- allow to trigger ad hoc events --> <action type="ACTION_INJECT_TOKEN" merge="replace"> </action> </default-action-policy> </portal> </server>
- Restart the server to enable the changes. Now all users are allowed to see and perform the Cancel action.
Initiate a process action in Business Space
You can now log in to Business Space to see and cancel an Order Handling process by doing the following:
- Switch to the Check Status page.
- In the Processes widget, select an Order Handling process and click
the Open action.
Process details are shown in the Process Information widget. Notice that the Cancel action is included in the Actions list.
- Click the Cancel action, as shown in Figure 14, to initiate the cancellation. The confirmation tab is opened in the Task Information widget.
- Confirm the cancellation and submit it.
Figure 14. Process Information widget shows the Cancel action
Using business data and filters in lists
When users work with lists they often need to see only a subset of tasks or processes and business data included in the list. In Process Portal, users can create saved searches that include search conditions as well as business data. Administrators can share saved searches making them available to all users.
In Business Space, the Processes and Tasks list widgets use saved searches to display processes and tasks associated with a BPD. By default, they use the All default saved search, which does not include any search condition or business data. To include conditions and business data, such as customer information, you can define your own saved searches, share them, and configure the widgets in Business Space to use them.
To include the customer's city information in the Tasks widget for the Order Handling process, you complete the tasks in the following sections.
Make business data available for searches
You first need to make the customer's city information available to searches. To do this, open the Order Handling BPD in Process Designer and complete the following steps:
- Make the corresponding process variable available as business data
and give it a search alias.
Figure 15. Process variable available in search
- Allow users to access the business data by exposing it in the process
Figure 16. Expose business data
Create and share a saved search
As you will likely want to provide the same customized business space to many users, you need to share the saved searches. Only administrators can share saved searches in Process Portal. Complete the following steps to create and share a saved search:
- Log in to Process Portal using a user that is assigned to the tw_portal_admin Java™ EE role of the IBM_BPM_Portal application; only these users are allowed to share a saved search to all users.
- Click Show Search then More to show the available columns. The search conditions that you specify here are applied as filters in Business Space, which cannot be changed. However, you can specify additional filters using the column headers in the list widgets.
- Select the columns of interest and add them to the Columns To
Display. The business data field you created previously is
also available in the Candidate Columns list and should be
Note: Although you can define default sorting criteria and number of items per page for the saved search, these are not used in Business Space. However, the number of items is automatically fitted to the view by default.
- Check Organize by Task. This property determines whether the saved search is available in the Tasks widget or in the Processes widget.
The completed Search dialog is shown in Figure 17.
Figure 17. Create Saved Search
- Click Search to run the search and check the result. Note that the customer city field is only filled in for instances that were started after you made the business data available.
- Click Save Search to save the search. The name of the search
is used by Business Space.
Figure 18. Save Search
- Click Share this Search to make the search available to all
Figure 19. Share Search
The saved search, including the business data, is available to all users.
To use the saved search in Business Space, you need to change the Tasks widget configuration. To do this, log in to Business Space and complete the following steps.
- Switch to the Initiate and Work with Tasks page and click Edit Page.
- From the widget menu of the Tasks widget, click Edit Settings.
- In the Tasks settings dialog, select Select task lists under Select task lists to display. The list contains the saved search that you created and shared in Process Portal.
- Select your tasks list, and click Set as default to use it as the default list for this widget.
- Clear the All list, and click OK.
Figure 20. Select Tasks List
- Select the properties that you want to display in the widget and then
click OK to save the configuration.
Figure 21. Select Task List properties
- Click Finish Editing to return viewing the page.
Using business data in lists in Business Space
The Check Orders saved search is now used to display tasks in the Tasks widget including the customer city information, as shown in Figure 22.
Figure 22. Tasks widget using Saved Search with business data
You can apply filters for and sort by the customer city as you can do for other columns using the column header. You can even combine column filters and pin these filter criteria for reuse.
In this article, you extended a business process definition so that users can start processes and perform actions on them in Business Space and you created a saved search so that users can see business data in task and process lists. You configured Business Space and the widgets and created a space from a template to work with your processes and tasks. You can now explore the possibilities of composing, wiring and configuring widgets and pages to adapt spaces to specific user roles and scenarios.
|Sample order handling process files1||Order Handling.zip||471KB|
- This package includes the process application before (V0) and after (V1) completing the steps in this article.
- Get complete product documentation for IBM Business Process Manager in the IBM Business Process Management Version 7.5 Information Center. The following topics are of particular interest:
- developerWorks BPM zone: Get the latest technical resources on IBM BPM solutions, including downloads, demos, articles, tutorials, events, webcasts, and more.
- IBM BPM Journal: Get the latest articles and columns on BPM solutions in this quarterly journal, also available in both Kindle and PDF versions.
Dig deeper into WebSphere on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Keep up with the best and latest technical info to help you tackle your development challenges.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.