There is a requirement that I need just a single instance of a process (long lived). If user tries to invoke process again it should not get invoked. A kind of singleton process. Is it possible?
Can u brief a bit more on this, what exactly do u want.
A new process instance is always created when a user invokes a process, but u can write logic to execute steps for fisrt time.
Thanks Chalukya !!
I have a process P1. It is monitoring a table in the database at regular fixed (5 mins) intervals, looped using wait point. Whenever a record is pushed in that table, P1 sends an email to admin, delete that record from the table. Now if TWO(2) instances are running of same process P1 then it may be the possibility that both instances checks table at same time and TWO(2) similar mails are sent. Situation would be more worse it more instances are running (multiple times invoked). So my concern is that if there is a way so that we can make a process so that it can only be invoked single time ??
Or please suggest me the other work-around for this situation.
You can have a column in your database say FLAG, which is false initially.
When your process P1 is invoked for the first time(if FLAG is false) then update FLAG as true and take a decision to continue with your for loop.
Now when another instance of P1 is invoked then again check for FLAG if true then skip for loop.
Hope this will Help.
Right this is the nice way to implement this. But I have to delete that record, no flag is bieng maintained as of now & its a wierd requirement of my client.
So I was going thru that way aka Singleton Process.But I think if this is the case then I have to convince my client for flag option.
Currently I was looking at http://localhost:8080/soap/services/TaskManagerQueryService?wsdl service. I think it could help me in getting a solution for it.
Hi, I went through the Service Management control in admin panel. There is a configurable pooling section that has three options in Request Processing Strategy:
I think making a component for livecycle which checks the status of the process using QyeryService (@ this link). This component will be placed in the beggining of the Process. It will get the status. If Process is running (instaceCount>1), kill itself. I dont know if there is a way to killing a process in workbech. I have thought to route it to the node that has no further way to go. Might be it's a wrong way to do this. Please remark/suggest.
It would be easier if you just stop the current instance rather than kill
the running one. And instead of making a component, you can also detect the
running instance via JDBC service.
Hope this helps.
I think this would be a better aproach.
Killing a process from workbench is not possible, you have to customize your services to do this.
And I am not much aware of that .
or do we have any services (any wsdl service) to kill or stop the process ??