Discussion:
[jboss-user] [jBPM] - How to signal event to process started by JBPM Console?
Thomas Setiabudi
2012-12-04 02:48:14 UTC
Permalink
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"How to signal event to process started by JBPM Console?"

To view the discussion, visit: https://community.jboss.org/message/779757#779757

--------------------------------------------------------------
Hi,

I Use JBPM5.4, My Database is MS SQL Server 2008

I started my processes using JBPM-Console.

The problem is JBPM Console does not have any REST Interface that allows us to send signal to a process instance.

What I should do to send signal to those process instances?


Any help is appreciated.



Regards,
Thomas Setiabudi
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/779757#779757]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2012-12-05 08:19:30 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: How to signal event to process started by JBPM Console?"

To view the discussion, visit: https://community.jboss.org/message/780055#780055

--------------------------------------------------------------
there is a signal REST interface method it's just now so clear as it is constrained by the bpm console interface which was designed prior to jBPM5 and does not accommodate all requirements, if i recall correctly it should be like this (relative path):
/rs/process/tokens/[processInstanceId]/transition?signal=[your-signal]^[event-object]

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/780055#780055]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Thomas Setiabudi
2012-12-05 08:21:43 UTC
Permalink
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"Re: How to signal event to process started by JBPM Console?"

To view the discussion, visit: https://community.jboss.org/message/780056#780056

--------------------------------------------------------------
Wow thats sure is interesting

What is the [event-object] Maciejs?
A JSON String?


Regards,
Thomas Setiabudi
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/780056#780056]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2012-12-05 08:24:18 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: How to signal event to process started by JBPM Console?"

To view the discussion, visit: https://community.jboss.org/message/780058#780058

--------------------------------------------------------------
currently it does support only simple string values as event object
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/780058#780058]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Thomas Setiabudi
2012-12-05 08:38:35 UTC
Permalink
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"Re: How to signal event to process started by JBPM Console?"

To view the discussion, visit: https://community.jboss.org/message/780063#780063

--------------------------------------------------------------
Thank you Maciej

Will give it a try and post back here.


Regards,
Thomas Setiabudi
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/780063#780063]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Thomas Setiabudi
2012-12-05 11:20:50 UTC
Permalink
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"Re: How to signal event to process started by JBPM Console?"

To view the discussion, visit: https://community.jboss.org/message/780101#780101

--------------------------------------------------------------
Hi Maciej,

By the way, what is the use of [event-object] ?


Regards,
Thomas Setiabudi
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/780101#780101]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2012-12-06 07:00:53 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: How to signal event to process started by JBPM Console?"

To view the discussion, visit: https://community.jboss.org/message/780289#780289

--------------------------------------------------------------
it's the object that is pass as argument 'event' to the ksession.signalEvent method

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/780289#780289]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Thomas Setiabudi
2012-12-06 09:05:02 UTC
Permalink
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"Re: How to signal event to process started by JBPM Console?"

To view the discussion, visit: https://community.jboss.org/message/780313#780313

--------------------------------------------------------------
Thank you Maciej, it works :D



Regards,
Thomas Setiabudi
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/780313#780313]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Hari Kumar
2013-06-26 06:14:28 UTC
Permalink
Hari Kumar [https://community.jboss.org/people/hari6025] created the discussion

"Re: How to signal event to process started by JBPM Console?"

To view the discussion, visit: https://community.jboss.org/message/824926#824926

--------------------------------------------------------------
Hi Maciej,

I am new to jbpm5.4. I have a requirement to handle exception in my workflow. Could you please suggest me the way to handle this?.
i thought of handling this using intermediate catch event. but here as well i'm facing the issue like i need to define that signal flow all the processes(parent and subprocess as well.). Need some inputs better way of handling the exception by having a single work flow defined for this exception and which will be used across all the processes.

Thanks in advance,
Hari.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/824926#824926]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Thomas Setiabudi
2013-06-28 02:08:34 UTC
Permalink
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"Re: How to signal event to process started by JBPM Console?"

To view the discussion, visit: https://community.jboss.org/message/825381#825381

--------------------------------------------------------------
Hi Hari Kumar,

Where do you mean your exception to happen? inside workItemHandler? or workflowRuntime Exception?

By the way, maybe you need to open a new forum thread since this one is only about how to signal event and is already answered. Open a new thread and you got bigger chance to get reply from others too.


Regards,
Thomas Setiabudi
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/825381#825381]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Hari Kumar
2013-06-28 03:18:56 UTC
Permalink
Hari Kumar [https://community.jboss.org/people/hari6025] created the discussion

"Re: How to signal event to process started by JBPM Console?"

To view the discussion, visit: https://community.jboss.org/message/825384#825384

--------------------------------------------------------------
Hi Thomas,

Thanks for your reply. Inside my service task handler(workItemHandler) i'm calling external webservice during this time if some exception thrown how do i handle this and I thought of defining one seperate exception flow for this. Could you plz suggest me the better way of doing this?

Regards,
Hari.


--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/825384#825384]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Thomas Setiabudi
2013-07-05 02:20:30 UTC
Permalink
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"Re: How to signal event to process started by JBPM Console?"

To view the discussion, visit: https://community.jboss.org/message/826503#826503

--------------------------------------------------------------
Hi Hari Kumar,

I think what you do should be ok.

Try to look at the implementation of org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler at code line around 185.
There the Work Item Handler can be confirgured to three kind of action when an exception occured:
1. Abort the work item, and the process will continue
2. Throw new Exception (and the process should rollback or stop at that node)
3. Log the error

Another option is to complete the workitem with output that will trigger the alternate flow path.

btw, you should open a new thread for this as others will be able to see your question and help too.

Regards,
Thomas Setiabudi
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/826503#826503]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
wishmaster7
2013-01-30 15:40:22 UTC
Permalink
wishmaster7 [https://community.jboss.org/people/wishmaster7] created the discussion

"Re: How to signal event to process started by JBPM Console?"

To view the discussion, visit: https://community.jboss.org/message/795184#795184

--------------------------------------------------------------
Hi guys,

I am working on the same case and I also have a problem with the signal event. Maciej's answer helped me, I can call the signal with the url:

/rs/process/tokens/[processInstanceId]/transition?signal=[your-signal]

and the signal is transmitted to the process. But when I add  +^[event-object]+ at the end of the url, it raises  +java.net.URISyntaxException: Illegal character in query+ . I think the +^+  doesn't work in the url.

How did you manage to pass a parameter with this event-object?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/795184#795184]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...