IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Changing the Processing Status

  • 1.  Changing the Processing Status

    Posted Wed September 14, 2005 02:53 PM

    Hi,

    Is there any way to change the Processing Status of a document in TN.I know we can change the User Status and the System Status by invoking wm.tn.doc:changestatus.

    ramesh.


    #B2B-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Changing the Processing Status

    Posted Wed September 14, 2005 03:27 PM

    Only using the above service wm.tn.doc:changestatus we can do change processingtatus of the persisted document in TN.

    I believe there is no other custom way that can change directly in TN.

    HTH,
    RMG


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 3.  RE: Changing the Processing Status

    Posted Wed September 14, 2005 03:43 PM

    Just in case there’s any confusion, the ‘system’ status is the same as the ‘processing’ status and this service can be used to update it. Thanks,

    Tim


    #B2B-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: Changing the Processing Status

    Posted Wed September 14, 2005 03:57 PM

    RMG,

    wM doesn’t recommend changing Processing Status. so we thought we will change the user status.But in the TN Console the user status doesn’t change even after i invoke changeStatus.i have to create one more processing rule with the new user status.then i have to reroute the doc to TN and the new processing rule picks up this doc.
    my requirement is whenever we change the user status,it should show up in the Transaction Analysis screen.
    is there any way to do it without creating a new processing rule and rerouting the doc to TN.

    ramesh.


    #webMethods
    #B2B-Integration
    #Integration-Server-and-ESB


  • 5.  RE: Changing the Processing Status

    Posted Wed September 14, 2005 04:16 PM

    RMG/Tim,

    what i observed from the Activity Log is,the user status is being changed to new status,but again it is changing the status back to the user status set in the processing rule.this happens even after i invoke EXIT step right after invoking changeStatus.

    ramesh.


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 6.  RE: Changing the Processing Status

    Posted Wed September 14, 2005 09:45 PM

    Ramesh,

    I was able to set the user status by not checking the ‘change user status’ action in the processing rule and then branching in my service to set the user status conditionally by calling the changeStatus service. I think if you check the box TN always sets the status after you invoke the service. HTH,

    Tim


    #B2B-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: Changing the Processing Status

    Posted Wed September 14, 2005 09:54 PM

    Ramesh,

    Tim’s solution is the right approach,even we dont use the Processingrule’s ChangeUserStatus option we keep in the flow depends on the processing status values using changeStatus service.Well it wont harm even we change systemStatus,i understand WM doesnt recommend but some times the requirement uses custom statuses.

    HTH,
    RMG


    #B2B-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 03:21 PM

    RMG/Tim,

    Requirement is there should be Processing Rule’s Change User Status set and as well as change the user status from the flow service on specific condition.so, if the condition is not met,user status in Transaction Analysis shows the processing rule’s change user status else if the condition is met it should show the user status from the call to the changeStatus.
    Let me know if this is possible.

    Thanks,
    ramesh.


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 9.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 03:31 PM

    yes i believe this is possible based on the conditions when you use both Processingrule vs changeStatus service…may be you are missing some condition in tbe branch,can you elaborate your flow.

    HTH,
    RMG


    #B2B-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 10.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 03:58 PM

    RMG,

    The processing rule’s status is set.and when processing the X12 Group,when a specific condition is met,i invoke changeStatus and set the status to let’s say “Error” and exit out of the flow.But when i check the Activity log,i see the status is changed to “Error” and the last entry in the Activity log shows that status is reverting back to the status set in the processing rule.
    As Tim said,this works if we dont set any status in the processing rule.

    ramesh.


    Flow.doc (32.8 k)


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 11.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 03:58 PM

    I think RMG is right. I just did the following: set the processing rule to change the user status to ‘TEST’ and put a branch in my flow service to change user status to ‘TEST1’ based on a condition. If the condition is not met, the service does nothing. The behavior I saw was that when the condition was met, the user status was set to ‘TEST1’ and did not change. Otherwise it was set to ‘TEST’ by the processing rule. So it seems like it should be possible to do what you need.

    Tim


    #B2B-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 12.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 04:08 PM

    I wonder if this could just be a latency problem. I noticed the behavior Ramesh describes, but when I went back to the document later the status was set correctly to the value specified in the service. This was especially noticable when I included an EXIT step, as Ramesh has, following the changeStatus call.

    Tim


    #webMethods
    #B2B-Integration
    #Integration-Server-and-ESB


  • 13.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 04:13 PM

    Tim,

    I removed the EXIT call and even then the status is set back to Processing rule status.Just check in the Activity log.first status changed indicates that status is set to Error and the next status changed indicates that it is set back to the processing rule’s status.

    ramesh


    TNActLog.doc (30.2 k)


    #B2B-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 14.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 04:20 PM

    May I suggest that the user status be set in one place or the other? Having the status set sometimes in the rule and sometimes in the service is a maintenance headache–and apparently a development headache too :slight_smile:

    Pick one or the other approach and always do it that way. I would recommend always setting the user status within the services, never in the rules.


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 15.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 04:26 PM

    Rob,

    I was wondering whether it was doable or not.i thought i was going wrong somewhere as Tim was getting the correct output in Transaction Analysis.

    ramesh.


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 16.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 04:27 PM

    Fellows,

    AFAIK, TN will update the status after returning from IS called service. This might be the reason of the ‘latency’ sensation.
    I had a requirement to control the user status and it just worked properly when not checking the ChangeUserStatus option.

    HTH,
    Maldonado


    #webMethods
    #B2B-Integration
    #Integration-Server-and-ESB


  • 17.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 04:27 PM

    Try setting the service to be invoked asynchronously in the rule.

    Tim


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 18.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 04:47 PM

    Tim,

    when i switch to asynchronous and the condition is met in the flow service, it’s working properly.but the problem is, when the condition is not met,it’s giving undesirable results.just curious to know what difference does it make when we change from synchronous to asynchronous.

    ramesh.


    #B2B-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 19.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 05:30 PM

    With synchronous processing TN waits for the service to complete before it finishes the other processing actions. With asynchronous processing TN executes all processing actions immediately. It seems odd that you’re getting the undesirable results when the conditions are not met, since in that case only the processing rule is changing the status and not both the rule and the service.

    It would certainly be cleaner to do as Rob and RMG have suggested and handle all status changes in the services. Is there any chance of getting the specification changed, based on the fact that TN is simply designed to function this way?

    If not, I can’t think of any easy or elegant way to accomplish what you need. For example, you could have your service execute as a task and not proceed with normal processing until the status has been set by the rule. I would think that whoever provided the specification would prefer changing it to trying to implement something like this. HTH,

    Tim


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 20.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 05:34 PM

    Setting a rule to invoke a service asynchronously will cause a thread to be created to run the service. The main thread that is processing the document (receive, recognize, persist, etc.) selects the rule and will spawn the thread, then set the status as indicated in the rule and return to the calling entry service. The invoked service that is running in another thread will later change that status.

    Be aware that making an invoke async can cause your system to be overrun depending on your document processing. For example, if you’re processing an EDI doc with lots and lots of groups or lots and lots of transaction sets, you can get lots and lots of threads. Perhaps enough to stress your server to failure.

    What are the “undesirable results” you speak of?


    #B2B-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 21.  RE: Changing the Processing Status

    Posted Thu September 15, 2005 07:04 PM

    Rob,

    Normal flow in the invoked service is it publishes a document locally which is picked up by the modeller.undesirable result is, it is not published at all as there is some service exception.
    Anyway i’ll try to convince my manager to change the specification.
    Thanks a lot for your time guys.I appreciate it.

    ramesh.


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 22.  RE: Changing the Processing Status

    Posted Sun October 02, 2005 04:54 PM

    Ramesh,
    “Requirement is there should be Processing Rule’s Change User Status set and as well as change the user status from the flow service on specific condition”

    this is not possible. what happens is even after u change, the status in ur service and do an immediate exit out of it, the status will change back to the once set in processing rule status. thats because as far as the rule is concerned, it has done it’s job and the status change is what it has do as the last part.
    so no matter where u exit, once the processing rule is identified and it runs it will change the status finally to what u have set in the rule.
    so it would be better for u to handle both kinds of status changes in ur service


    #B2B-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 23.  RE: Changing the Processing Status

    Posted Tue October 18, 2005 01:06 PM

    Hi,
    I have an EDI 810 sent by a TP. I have a processing rule defined in TN for the X12 Group type and after successful processing the document in the developer I can see(in TN)the user status and system status of only X12 Group being updated and I am not able to update the user and system statuses of Envelope and the Transaction set. Is there any way? Can any one help me? I will be very grateful

    Thanks


    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 24.  RE: Changing the Processing Status

    Posted Tue October 18, 2005 02:12 PM

    Bala,

    Create 2 processing rules, one for the X12 Envelope Document Type and the other for 810 Transaction Set and set the user status under the Actions tab of the processing rules.
    hope this helps.

    ramesh.


    #Integration-Server-and-ESB
    #B2B-Integration
    #webMethods


  • 25.  RE: Changing the Processing Status

    Posted Wed October 19, 2005 03:46 PM

    Bala,

    Are you updating the UserStatus via processing rule or flow service changeStatus?Normally Envelope userstatus will be updated since most sent envelopes to VAN or Internet…

    or else follow Ramesh’s suggestion…

    HTH,
    RMG


    #Integration-Server-and-ESB
    #B2B-Integration
    #webMethods