Topic
  • 6 replies
  • Latest Post - ‏2013-05-21T22:47:28Z by Marko_Marcevski
raghava1239
raghava1239
35 Posts

Pinned topic UCA TRIGGERING

‏2012-07-19T15:23:15Z |
hi folks,
Can we trigger a UCA at the time mentioned in timestamp in DB?

What ever time we give in DB in timestamp field(or any other data type) the UCA should read the time and trigger at that time. Can we do that?

please help me on this issue

regards
raghava
Updated on 2012-07-19T19:24:59Z at 2012-07-19T19:24:59Z by kolban
  • kolban
    kolban
    3321 Posts

    Re: UCA TRIGGERING

    ‏2012-07-19T19:24:59Z  
    There are probably a couple of ways this could be handled. But let us examine what we have to play with. We have a timestamp that is a column in a row in a table and we have a UCA that, when fired causes some work to happen. Our challenge is how to fire the UCA at the given timestamp?

    I don't think that the "scheduled" UCA mechanism baked into the product will help us. It has no relationship to external data.

    Instead, what we want is likely to be a "process" that runs as follows:

    1. Process Starts
    2. Process queries time stamp in table
    3. Process "suspends" using a Timer Event until the timestamp value has been reached
    4. Process fires the correct UCA

    An alternate solution not involving Processes would be to leverage the REST API which can cause a UCA to fire. Using that API we can then configure some external App such as a Java EE program or some other technology (maybe DB has a timestamp trigger mechanisms itself?) such that when the time is reached, a REST request can fire.

    Neil
  • SultanMirza
    SultanMirza
    11 Posts

    Re: UCA TRIGGERING

    ‏2013-05-15T08:05:30Z  
    • kolban
    • ‏2012-07-19T19:24:59Z
    There are probably a couple of ways this could be handled. But let us examine what we have to play with. We have a timestamp that is a column in a row in a table and we have a UCA that, when fired causes some work to happen. Our challenge is how to fire the UCA at the given timestamp?

    I don't think that the "scheduled" UCA mechanism baked into the product will help us. It has no relationship to external data.

    Instead, what we want is likely to be a "process" that runs as follows:

    1. Process Starts
    2. Process queries time stamp in table
    3. Process "suspends" using a Timer Event until the timestamp value has been reached
    4. Process fires the correct UCA

    An alternate solution not involving Processes would be to leverage the REST API which can cause a UCA to fire. Using that API we can then configure some external App such as a Java EE program or some other technology (maybe DB has a timestamp trigger mechanisms itself?) such that when the time is reached, a REST request can fire.

    Neil

    Hi Neil,

    Could you please share the REST Api which can cause a UCA to fire.

     

  • AndrewPaier
    AndrewPaier
    832 Posts

    Re: UCA TRIGGERING

    ‏2013-05-15T16:57:19Z  

    Hi Neil,

    Could you please share the REST Api which can cause a UCA to fire.

     

    You can see all the API calls by going to http://yourserver:yourport/bpmrest-ui  This allows you to see and execute (with values) all the various REST API calls and gives you the rest call itself.

    I was unable to find a call to trigger a UCA, however you could create a service that would contain the UCA and then execute the "Start Service" call.  You could also expose this same service as a URL and call it. 

    The REST API call is documente here

    Andrew Paier  |  Director  |  BP3 Global, Inc.
    BP3 Global's Website  |  Twitter  |  Linkedin  |  Google+  |  Blogs

  • kolban
    kolban
    3321 Posts

    Re: UCA TRIGGERING

    ‏2013-05-16T17:54:29Z  

    You can see all the API calls by going to http://yourserver:yourport/bpmrest-ui  This allows you to see and execute (with values) all the various REST API calls and gives you the rest call itself.

    I was unable to find a call to trigger a UCA, however you could create a service that would contain the UCA and then execute the "Start Service" call.  You could also expose this same service as a URL and call it. 

    The REST API call is documente here

    Andrew Paier  |  Director  |  BP3 Global, Inc.
    BP3 Global's Website  |  Twitter  |  Linkedin  |  Google+  |  Blogs

    Well huh!!!  I think I over spoke in my last post.  I too looked for a REST API to start a UCA and couldn't find one.  This still doesn't mean that there isn't one but my thinking is not so certain that one will be found.  A potential solution would be to create a service and then expose that service.  The service can then be started through the RESP API (I know that at least is true).  The service can include an invoke UCA element to start a named UCA.

    Sorry for the confusion guys.

    Neil

  • SultanMirza
    SultanMirza
    11 Posts

    Re: UCA TRIGGERING

    ‏2013-05-17T12:27:32Z  
    • kolban
    • ‏2013-05-16T17:54:29Z

    Well huh!!!  I think I over spoke in my last post.  I too looked for a REST API to start a UCA and couldn't find one.  This still doesn't mean that there isn't one but my thinking is not so certain that one will be found.  A potential solution would be to create a service and then expose that service.  The service can then be started through the RESP API (I know that at least is true).  The service can include an invoke UCA element to start a named UCA.

    Sorry for the confusion guys.

    Neil

    Hi Neil/Andrew,

    Thanks for that. Yes I had the same approach. Just I was curious, if I have missed the Rest for UCA.

    Thanks for the replay.

     

    Adarsh

  • Marko_Marcevski
    Marko_Marcevski
    2 Posts

    Re: UCA TRIGGERING

    ‏2013-05-21T22:47:28Z  
    • kolban
    • ‏2013-05-16T17:54:29Z

    Well huh!!!  I think I over spoke in my last post.  I too looked for a REST API to start a UCA and couldn't find one.  This still doesn't mean that there isn't one but my thinking is not so certain that one will be found.  A potential solution would be to create a service and then expose that service.  The service can then be started through the RESP API (I know that at least is true).  The service can include an invoke UCA element to start a named UCA.

    Sorry for the confusion guys.

    Neil

    Hi Neil,

    If I'm not wrong to start an UCA via rest you could use the send message function in the process section:

    http://pic.dhe.ibm.com/infocenter/dmndhelp/v7r5m1/index.jsp?topic=%2Fcom.ibm.wbpm.bspace.ref.doc%2Fbpmrest-docs%2Frest_bpm_wle_v1_process_post_sendmessage.htm

    this is the equivalent of firing an UCA via rest which in turn if you set it to be a start message to the BPD you will be able to start a new process instance.

    You need to take some care to make sure the message has the right format, but in general it should work fine.

    Marko