About Me

About Me
Working with SOA technologies , implementing solution using IBM BPM , IBM Integration Designer,IBM WODM and IBM DataPower

About me

View Mahesh Dondeti's profile on LinkedIn

upcoming posts on IBM Bluemix,Devops,Worklight,Node js.

Tuesday 28 January 2014

Consume and Durable Subscription Options Usage on UnderCoverAgent (IBM BPM ):-



Consume and Durable Subscription Options Usage on UCA  (IBM BPM ):-

Durable Subscription:-
Think Our BPD is like this:-
                                                            
Start Event----->Parallel Gateway--------------> MIE1(Message Intermediate event(configured 
                                                  !                         MyUCA1))------------->Scrpit1---------->end
                                                  !                          
                                                  !
                                                  !----------->      MIE2(Message InterMediate event(Configured    
                                                                          MyUCA1))-- ----------------->Script2------------>end
                                                                      
Human Service:-(fireMyUCA1 human Service)
Start------------->Invoke UCA(Configured MyUCA1) -------->end
Testing:-
case1:-
1)If we start BPD instance  .Then flow waits at MIE1,MIE 2 .
2)If we run fireMyUCA1 Human Service.Then both MIE1,MIE2 will trigger and instance will be completed success fully.
Case2:-
1) Check Durable Subscription option for MIE1 and Uncheck Durable Subscription option for MIE2.
2)Dont start BPD  .But Run ” fireMyUCA1” human Service.
3)Now Start the BPD.Go to inspector  view,Flow only waits at MIE2 only because MIE1 automatically fires because Durable Subscription option was checked .If you want fire MIE2 again you have to run fireMyUCA1 human  service.
Observations:-We are checked Durable Subscription option for MIE1 means .If any of  event fired(Which related MIE1) before flow reached MIE1 .That event persisted  and Once our flow come into active it will be fired .

“What if the event that would trigger the listener occurs before the listener is reached? This is where the concept of the Durable Subscription comes into play. If this flag is checked, then the arrival of an event before the listener is reached is remembered and when the process
reaches the Intermediate Message Event, it is immediately notified that the solution can continue. If this flag is not checked, then the event that arrived previously is discarded and the process will wait for a further event.”

Consume explanation:-
"Consume" means when an intermediate listener in a given Business Process instance correlates to a message, should it mark that message so that it will not be used by any other event listeners in that instance that are listening for the same event.  It is very important to note that this is a per instance flag.  The value on this flag has no between 2 listeners in separate BPD instances.  If a message is consumed, then the next time a listener begins listening it will only react to events that have not been consumed for this Business Process Instance.

Create two BPDs:
BPD1:-
MessageStartEvent(Configured with MYUCA1)---->MIE(Configured with MYUCA1)----->End  (Consume Option was checked)
BPD2:- MessageStartEvent((Configured with MYUCA1)---->MIE((Configured with MYUCA1)----->End      (Consume Option was Unchecked)
Testing:-
1)Create Human Service which will fire MYUCA1.Run service
2)Then Two instances were created (BPD1,BPD2).
3)Coming to BPD1 flow, instance   will wait at MIE step because ,StartMessageEvent was consumed the message .So MIE is waiting for another Message.(If you observe the BPD1 Instance status is in Active state).
4)coming to BPD2 flow  won’t wait it fires both events(MSE,MIE).(If you observe the BPD2 Instance status is complete )

I hope this post helps you. So far this is my best effort to explain. Please correct me if I do anything wrong.

Please share your valuable suggestions and feedback to my mail id"mdondetisbit@gmail.com" to improve myself.


Please post any issues/query’s related to BPM,WODM and DATAPOWER  to "mdondetisbit@gmail.com

Friday 24 January 2014

Ad hoc Start Event Usage in IBM BPMv8.0





Ad hoc Start Events Usage in  IBM BPMv8.0:-

Hello friends I would like to share scenario on usage  of ad hoc start events in IBM BPMv8.0.  

Scenario :-( Order Processing)

Order processing process application allows the customers to book their orders from web. In order to complete this it follows the below steps.
      
  • A user login into portal with their credentials and enters order, credit card and shipping info.
  • For processing this order it takes maximum 7 days .Within this 7 days a customer can cancel his order at any time  .
  • To cancel Order customer has to call the Call center agent .A call-center agent needs to cancel specific order.

If you observer above scenario, have to perform action  (cancelling Order )on  existing instance (Order creation).
            You often have a need for users to be able to perform actions on a process.for example
             Cancelling an instance when a client decided not to proceed with the current order
While a process is running, a user might need to launch a new activity or set of activities.

The above situations we can handle/achieve with “ad Hoch  start event “in Process Designer


Order Processing BPD:-

1). “GetOrderInfo “user task allow s user/ customer  to enter order ,credit card ,shipping info ..etc  .”Processing Order “ sub process  will process submit Order.(which may take max 7 days).



2)In Cancel Order lane I had used script activity  and added simple log statements(As it is for demonstration purpose).but in real time case you  may add your own logic for Order Cancellation  like Using system task to delete process instance or deleting order from database using IS(integration services)..etc.

3) Coming to Ad hoc start event  activity configuration name as “InvokeOrderCancel”(Which is used to start Ad hoc event using web API),In Implementation have option  event visibility which allows us to restrict access from Process Portal to particular participant group/Users.



Now how we can access/start this ad Hoch stat event ? This can be done in two ways:

1. Using process Portal
2. using web API

Using process Portal to start Ad hoc start event:-

  • I hope this post helps you. So far this is my best effort to explain. Please correct me if I do anything wrong.
  • Login into Process Portal with valid credentials (Who have rights  to cancel order in our case call-center agent.
  • Select the waiting task in instance and expand it and there is option with name “Invoke ordercancel”(Which is the name of Ad hoc start event name) as shown below. Click on it.
 


 
Note: -Ad hoc task instances that were created during the running of a process instance must be complete before the process instance completes.
A user /customer can request for Order cancellation to call-center agent before Order was shipped.

Using WebAPI  to start Ad hoc start event:-

  • Select the waiting task in instance and expand it and there is option with name “Invoke ordercancel”(Which is the name of Ad hoc start event name) as shown below. Click on it.
  • Use the below script to start ad Hoch start event in a BPD.
               

 var ProcInstanceID="2563";
log.info("Current Process Instance ID"+ProcInstanceID);
var AdhocEventName="InvokeOrderCancel";
var processID = tw.system.findProcessInstanceByID(ProcInstanceID);
processID.findAdhocStartingPointByName(AdhocEventName).startNew();

General System Service to Start Ad hoc Start Event:-




Sysout.log file:-
Common Problem while Setting Event visibility to Ad hoc start event to Particular Participant group/Users :-

If you want to restrict some process portal options (for example Start Ad hoc events) to particular users/groups. we need to set event visibility options properly and verify   100Custom.xml ,if  the permission for ACTION_INJECT_TOKEN is given to particular  users/groups.

For more information go through below link



I hope this post helps you. So far this is my best effort to explain. Please correct me if I do anything wrong/any best way other than this.

Please share your valuable suggestions and feedback to my mail id"mdondetisbit@gmail.com" to improve myself.

Please post any issues/query’s related to BPM,WODM and DATAPOWER  to "mdondetisbit@gmail.com