Run the sample

Testing the sample is identical with running the sample on the Playback Server. In the first part we describe how this is done using the BPEL Business Process Choreographer and WLE Portal. In the second part we are going to use Business Space with the federated client.

Pre-requisite to run the sample is that you either have created the Procurement_Sample_Test process application yourself as described in the section “Build it yourself”. Otherwise import and activate the Procurement_Sample_Test1_FINAL.twx file. For the later one open the IBM Business Process Manager Process Center console using your Internet Browser: http://localhost:9080/ProcessCenter/login.jsp. Enter as User Name = tw_admin and Password = tw_admin. Press Import Process App and navigate to the above process application snapshot. The process application is automatically deployed to the Process Center Server when the import completed and succeeded.

1. Execute the Process Application in BPEL Business Process Choreographer and WLE Portal

a. Launch the BPEL Process Choreographer Explorer
Open your internet browser and enter http://localhost:9080/bpc or right-click on your server and press  Launch > BPEL Process Choreographer Explorer.

start BPEL Processs Choreographer Explorer

Logon with userid = tw_admin and password = tw_admin.
The BPEL Business Process Chreographer Explorer opens.

b. Start process instance
In the navigation tree select Process Templates > Currently Valid.
Flag the process template ReplenishmentBPEL and press Start Instance.

start instance


c. Enter values for the Process Input Message
Process Name = Replenish_Test_222
orderID = OID_222
partNumber = PN_222

Quantity, orderAmount, etc. don’t have to be provided.

submit process start


Press Submit.
The process instance is started.

d. Access Process State View
Follow the status of the process instance accessing the instance via Process Instances > Started by me. Flag the process instance with the Process Name Replenish_Test_222 entered above. Press View Process State.

started by me


The Process State View opens and shows the current state of the BPEL process, here the ApproveReplenishmentOrder activity waiting on the two-way asynchronous response.

process state view


e. Perform WLE task using Portal
Start your internet browser and login to the WLE Portal via http://localhost:9080/portal. Enter the User Name = tw_admin and Password = tw_admin.

logon portal


The My Tasks Inbox opens.

Flag the current task and press Run.

run task


The form for the Coach ApproveReplenishmentOrder opens.
Verify (and modify) the data. Press Ok.

verify form data


The ReplenishmentBPEL process concludes with the transmission of the supplier order and storing the order in an ERP system. This can be seen in the SystemOut.log or in the Console view of IID.


2. Execute the Process Application using the federated client in Business Space

This time we execute the replenishment process using Business Space as enduser interface. As we are dealing with tasks managed by WPS / HTM as well as WLE we use the Business Space configuration of the federated client.

a. Create your own space
Open the Business Space application and create a new space for the procurement sample application.
Open your internet browser and enter the url for the Business Space http://localhost:9080/BusinessSpace or https://localhost:9443/mum/enabler.

You might be prompted to accept a Security Certificate. If so, confirm this.

business space login

b. Create the Procurement Sample Space
Select Manage Spaces.

manage spaces


Press Create Space.

create space


Enter the Space name: Procurement Sample Space
Create the new space based on a template. Select as template: Advanced Task and Process Management. Press Save.

space name


The Procurement Sample Space is created.

space created


Press Done.

c. Configure the Task Definitions list
Press Go to Spaces.

go to spaces


The Go to Spaces window opens.
Double-click the Procurement Sample Space to open it.

open spaces


The space opens. Open the Initiate Tasks and Process page. See the widget with the list of Task Definitions.
Two versions of the process application are currently deployed. First, the PSTEST1-Tip deployment, and, second, the PSTEST1-PSTEST1_SS2 snapshot. Based on these two versions two Replenish_InvocationTasks are included in this task definition list. In Business Space processes are started by invocation tasks and not triggering by initiating the process template.

two replenish invocation tasks


Note (optional step)
Select Undeploy TIP in the Process Center Admin Console if one of the Replenish_InvocationTasks with the TIP is annoying to you.

undeploy tip


Press Edit Space on the top far right.

edit page


For the Task Definitions list press the twisty and select Edit Settings … .

edit settings


The settings window for Content opens.
Flag the property Snapshot.

flag snapshot


Select the Display tab.

Select Table as layout for the task definitions.
Press Apply. Press OK.

table view



Press Finish Editing on the far right.

finish editing

The Initiate Tasks and Processes page opens again. This time in table layout and with the Snapshot column displayed. You see that the first, the older Replenish_InvocationTask, represents a TIP, while the second one displayed shows invocation task for the snapshot we created before with name SS2.

snapshot column


d. Start process instance

In the Task Definitions list select the Replenish_InvocationTask that belongs to the Procuement_Sample_Test1_FINAL. Under Actions click Create an instance from this task definition.

create an instance

Notice that you need to have installed the Procurement_Sample_BPELProcess_FormsEARFile.ear which provides the html form for the invocation task.

The Task Information window is refreshed and starts any empty Input form for the Replenish_InvokationTask. The Input form opens. Enter
orderID = OID_333
partNumber = PN_333

Quantity, orderAmount, etc. don’t have to be provided.

submit instance data

Press Submit.

In the Status Widget you can see the task ApproveReplenishmentOrder, that is executed by WLE engine of the Business Process Manager, is available.
Flag this task. Press Open this task.

open task


The Task Information widget provides details on this WLE task.

task information


The Process Information widget provides details on the process that was started by the invocation task. At the same time information on the WLE task belonging to this BPEL process instance.

process information


3. Work on Tasks

Perform the human task managed by the WLE engine accessible via the federated Business Space Client.

a. Select the Work on tasks page tab
The Tasks widget opens with no tasks found as Work on my tasks refers to claimed tasks only.
Select All > Assess and work on my tasks to see the available (status = ready) tasks.

change filter

With the modified filter you see the task available to you. However, the task must be completed in 10 minutes. Otherwise it would expire and the replenishment order would be approved per default.

Flag this task. Under Actions press Accept to open and work on the task.

accept andedit task


The Accept claims and starts the task for the current user. The status changes to “In progress”.
The task with its input / output form is opened in the Task Information widget.
Update any parameters, if you want.

Press OK.

complete task

b. Response to Invocation Task
Return to Task Information widget. Open the Replenish_InvocationTask and see the output1 received.

output



Congratulations. You have successfully completed this lab for the bottom-up STP scenario !!!