Topic
  • 5 replies
  • Latest Post - ‏2013-01-12T17:28:29Z by SystemAdmin
SystemAdmin
SystemAdmin
7615 Posts

Pinned topic Starting a service requires a snapshot id now

‏2013-01-09T22:35:04Z |
With version 8.0.1 it looks like it is required to specify a specific snapshot when starting a service by means of the rest api. In previous versions this wasn't required and the tip version of the service was automatically executed or the default one on process servers.

If this is true than I think this does not comply with the ideas of service orientation, because if only the implementation changes of the service and the interface stays the same the (external user and party) of this service has to update his url as well. In other words: the interface and implementation of the service are tightly coupled now!

I would like to have the old way of working, because we are still in development and another party is creating a portal that uses the rest api to call services in bpm, but now they have to update the url everytime we make a new snapshot. We often only change implementation aspects not the interface of the service.

Does anyone know if the old way of automatically calling the tip or default version of a service when no snapshot is specified is still supported or am I missing something?

Kind regards,

Jacob
Updated on 2013-01-12T17:28:29Z at 2013-01-12T17:28:29Z by SystemAdmin
  • kolban
    kolban
    3316 Posts

    Re: Starting a service requires a snapshot id now

    ‏2013-01-09T23:13:20Z  
    Hi Jacob,
    Good discussion thread.

    In a Service Oriented Architecture we have the concept of a service and an endpoint. The service describes "what it does" and "what parameters it expects and returns". This is similar to a signature / interface concept in programming languages. The second aspect, the "endpoint" describes "where it is located and how to invoke it" and this has always been "mechanical" in nature. The original "Web Services" specification had a concept called "UDDI" to allow an application to lookup endpoint information to find where to call the system.

    The REST API exposed by IBM BPM provides a way to retrieve meta information about snapshots. In principle, one could perform a query to get the list of snapshots for a process app, choose the "latest" and make any service requests using the ID of that snapshot. The query to obtain the snapshot id should be only needed to be executed once since it shouldn't change during the life of a client/server session.

    However, having said all that, looking at the docs here:

    http://pic.dhe.ibm.com/infocenter/dmndhelp/v8r0m1/topic/com.ibm.wbpm.ref.doc/rest/bpmrest/rest_bpm_wle_v1_service_instanceid_post_start.htm

    It is still claimed that the Snapshot ID is optional. What is causing you to understand that the snapshotId is now required?

    Neil
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Starting a service requires a snapshot id now

    ‏2013-01-09T23:27:05Z  
    • kolban
    • ‏2013-01-09T23:13:20Z
    Hi Jacob,
    Good discussion thread.

    In a Service Oriented Architecture we have the concept of a service and an endpoint. The service describes "what it does" and "what parameters it expects and returns". This is similar to a signature / interface concept in programming languages. The second aspect, the "endpoint" describes "where it is located and how to invoke it" and this has always been "mechanical" in nature. The original "Web Services" specification had a concept called "UDDI" to allow an application to lookup endpoint information to find where to call the system.

    The REST API exposed by IBM BPM provides a way to retrieve meta information about snapshots. In principle, one could perform a query to get the list of snapshots for a process app, choose the "latest" and make any service requests using the ID of that snapshot. The query to obtain the snapshot id should be only needed to be executed once since it shouldn't change during the life of a client/server session.

    However, having said all that, looking at the docs here:

    http://pic.dhe.ibm.com/infocenter/dmndhelp/v8r0m1/topic/com.ibm.wbpm.ref.doc/rest/bpmrest/rest_bpm_wle_v1_service_instanceid_post_start.htm

    It is still claimed that the Snapshot ID is optional. What is causing you to understand that the snapshotId is now required?

    Neil
    Hello Neil,

    I agree that your solution brings back the SOA principles but it would require some rework that I don't want to introduce just before some deadlines ;-).

    We hit the problem after upgrading to 8.0.1 from 8.0.0. When using the rest api with a service id without a snapshot id it complaint that the service could not be found or is removed. If I include the snapshot everything works. On the old 8.0.0 installation we still have it works in both cases.

    I think i will redeploy my apps on the new 8.0.1 maybe that helps. We now just preformed an upgrade and did not re-install any of the process apps.

    Could it be a problem that the process server is 8.0.1 but the process center and designer 8.0.0? I know I have to install the process apps with the offline procedure but maybe there are other side effects...
    Kind regards,

    Jacob
  • kolban
    kolban
    3316 Posts

    Re: Starting a service requires a snapshot id now

    ‏2013-01-09T23:35:03Z  
    Hello Neil,

    I agree that your solution brings back the SOA principles but it would require some rework that I don't want to introduce just before some deadlines ;-).

    We hit the problem after upgrading to 8.0.1 from 8.0.0. When using the rest api with a service id without a snapshot id it complaint that the service could not be found or is removed. If I include the snapshot everything works. On the old 8.0.0 installation we still have it works in both cases.

    I think i will redeploy my apps on the new 8.0.1 maybe that helps. We now just preformed an upgrade and did not re-install any of the process apps.

    Could it be a problem that the process server is 8.0.1 but the process center and designer 8.0.0? I know I have to install the process apps with the offline procedure but maybe there are other side effects...
    Kind regards,

    Jacob
    Hi Jacob,
    Its obviously not impossible that 8.0.1 broke something. If I were in your shoes, I'd capture an HTTP trace to see exactly what REST request is being sent and received. I would try this without supplying a Snapshot ID. I'd then try the same with a Snapshot ID. I suspect we can both imagine the results but it is always good to question ones beliefs and a trace like this sure won't do any harm. I'd use a TCP level sniffer such as TCPMon. If you are making the REST calls from a browser, you should be able to trace directly from there. My weapon of choice these days is Chrome with its in-built developer tools.

    If you capture these, feel free to post so we can all have a look-see.

    Neil
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Starting a service requires a snapshot id now

    ‏2013-01-10T20:24:48Z  
    • kolban
    • ‏2013-01-09T23:35:03Z
    Hi Jacob,
    Its obviously not impossible that 8.0.1 broke something. If I were in your shoes, I'd capture an HTTP trace to see exactly what REST request is being sent and received. I would try this without supplying a Snapshot ID. I'd then try the same with a Snapshot ID. I suspect we can both imagine the results but it is always good to question ones beliefs and a trace like this sure won't do any harm. I'd use a TCP level sniffer such as TCPMon. If you are making the REST calls from a browser, you should be able to trace directly from there. My weapon of choice these days is Chrome with its in-built developer tools.

    If you capture these, feel free to post so we can all have a look-see.

    Neil
    An update. The service was created in a toolkit that was used in multiple other toolkis that were all used in the process app. Although not the best design I realize, previously this was no problem and I didn't have to specify a snapshot id. When I move the service to the app itself all works as it did previously (didn't have to specify snapshot id). So it seems the api has become more strict and only allows starting a service without a snapshot id when there's only one service defined/active. In the case that the service was defined in the toolkit you will find an exposed service for each toolkit it is used in and the app, and they all have their own namespace. Starting the service with a service name and app id without snapshot id didn't work either in this case.
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Starting a service requires a snapshot id now

    ‏2013-01-12T17:28:29Z  
    An update. The service was created in a toolkit that was used in multiple other toolkis that were all used in the process app. Although not the best design I realize, previously this was no problem and I didn't have to specify a snapshot id. When I move the service to the app itself all works as it did previously (didn't have to specify snapshot id). So it seems the api has become more strict and only allows starting a service without a snapshot id when there's only one service defined/active. In the case that the service was defined in the toolkit you will find an exposed service for each toolkit it is used in and the app, and they all have their own namespace. Starting the service with a service name and app id without snapshot id didn't work either in this case.
    That makes sense. Effectively based of what you were saying there wasn't a good way for the API to determine which version of the service to run since there were essentially mutliple services with the same name present. I'm surprised it worked reliably in 8.0. Actually if it were still in multiple toolkits, I would wonder which one was executing even when you supplied the snapshot ID….

    Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com