Tuesday, August 30, 2011

Correlation in OBPM

This is the continue blog of Message wait and notification in OBPM

The exp file is under Avio-OBPM Training\Message Wait\

Tasks_4_5_6

Open “Process to Notify With Correlation” , double click “Begin” activity

image

Click the Correlation icon image

add new correlation and add property

image

image

image 

 

The initial code about customerId is in “Task 4 – Create Instance”.

input "Customer Id" : customerIdArg
using title = "Create instance",
buttons = ["Ok", "Cancel"]
returning selectedButton = selection


Here is the UI.



image



Double click the “Wait” activity, add argument



image



Add correlation



image



The initiate should be “No” as it is already initiated in the “Begin” activity.



In process “Notification using a Correlation”, put the code below in “Task 6 – Notification using a correlation”



custId as String
args as Any[Any]

input "Enter customer Id to notify" : custId
using title = "customer id",
buttons = ["Ok", "Cancel"]
returning selectedButton = selection

// Set the value to the argument in the Message Wait
args["customerIdArg"] = custId

send Notification
using processId = "/ProcessToNotifyWithCorrelation",
activityName = "Wait",
arguments = args,
argumentSetName = "WaitIn"


To test it



image



image



Since there is no interactive activity, nothing will be show in the inbox. It will simply wait here until it is notified.







image



input the same customer id to notify



image



The instance is notified and displayed in the inbox.



image



 



The correlation initiate could be done in code



In the “Beginning” activity



image



Put in an automatic activity with this code



valuesToUse as Any[]

valuesToUse[] = customerId

initiate Correlation
using name = "customer",
values = valuesToUse

No comments:

Post a Comment