ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » restart an activity after it expires

Post new topic  Reply to topic
 restart an activity after it expires « View previous topic :: View next topic » 
Author Message
jhea
PostPosted: Fri Jan 24, 2003 2:26 am    Post subject: restart an activity after it expires Reply with quote

Novice

Joined: 18 Dec 2002
Posts: 19
Location: UK Hursley

Hi,

I want an activity to be restarted after it expires. I set its Exit condition to _RC=0. It expires after 2 minites in the status of either 'ready' or 'running' with scheduling server running at 1-m notification check interval, 1-m check interval, and autostart. However it doesn't restart after expiry, instead the process proceeds to the next activity . Any comments why this happens? Any hits to resolve this?

Cheers,
Jenny
Back to top
View user's profile Send private message
yaakovd
PostPosted: Fri Jan 24, 2003 5:17 am    Post subject: Reply with quote

Partisan

Joined: 20 Jan 2003
Posts: 319
Location: Israel

You must add Data Loop Connector on your activity, it working together.

Take block activity with Data Loop Connector and Exit condition on it. Put your Programm activity inside, add Data default connector on it self (when activity expired - it will transfer data from input to output, other you will loose your data).
You can do it without Block, but both of connectors are required.
_________________
Best regards.
Yaakov
SWG, IBM Commerce, Israel
Back to top
View user's profile Send private message Send e-mail
jmac
PostPosted: Fri Jan 24, 2003 7:17 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

Jenny wrote:
I want an activity to be restarted after it expires. I set its Exit condition to _RC=0.


I believe that the way to get what you need is to add an activity that will receive control via the Transition Condition
Code:
_State() <> _Expired


Now your original activity and this new activity will have to be in a Block

This new activity activity will have to set an item in the Sink of the Block such that the Block fails its exit conditon.

The reason you need to do this is because it is my opinion that when an activity expires the Exit condition is not evaluated.

Note that I have NOT tested this, but I believe it should work... If you try this please let us know.
_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
dkrawczynski
PostPosted: Fri Jan 24, 2003 9:51 am    Post subject: Reply with quote

Apprentice

Joined: 19 Dec 2002
Posts: 26
Location: Dallas, TX

The behavior you are seeing is correct. Expiration means the workitem will exit the activity. I have tested expiration on activities that have exit conditions and the exit condition is ignored just like it is if you force finish a workitem. If you want an expired workitem to reappear in the same activity you must do as John explained in the previous post.

Why are you using the expiration feature if you do not wish the workitem to leave the activity? Also, what is the purpose of "restarting" an activity every two minutes? Answers to these questions may lead to alternative solutions that do not involve using the expiration feature.
_________________
Doug Krawczynski
IBM Certified Solutions Expert -
MQSeries Workflow
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jhea
PostPosted: Fri Jan 24, 2003 10:19 am    Post subject: Reply with quote

Novice

Joined: 18 Dec 2002
Posts: 19
Location: UK Hursley

Many thanks to the replies. I have made some experiments. Here are the findings:

1) as John said, when the activity expires, the exit condition for the activity doesn't get evaluated, which makes sense.
2) I coudn't use _State() <> _Expired as the transition condition because the buildtime complains both of _State and _Expired are not valid.
3) I used setup suggested by Yaakov, i.e. to put the activity in a block, connected to a source and sink as it is simpler solution. the block exit condition used is to evaluate a member of the output data container of the block. It successfully achieved my purpose.

Have a nice weekend.

Jenny
Back to top
View user's profile Send private message
jmac
PostPosted: Fri Jan 24, 2003 10:25 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

Jenny wrote:
I coudn't use _State() <> _Expired as the transition condition because the buildtime complains both of _State and _Expired are not valid.


What version of MQWF are you using? Both of these are certainly valid, in fact I ran a test before I sent my original response.
_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jhea
PostPosted: Fri Jan 24, 2003 10:26 am    Post subject: Reply with quote

Novice

Joined: 18 Dec 2002
Posts: 19
Location: UK Hursley

Doug,

Quote:
Why are you using the expiration feature if you do not wish the workitem to leave the activity?

This is because the activity we are trying to implement involving third-party system. If the third-party system is down for sometime, we would like the activity to give some response back to the use, and let the user to decide if to restart the activity or not.

Quote:
Also, what is the purpose of "restarting" an activity every two minutes?

To make it restart every two minutes is just for testing purpose

Many thanks to your opinion.

Jenny
Back to top
View user's profile Send private message
jhea
PostPosted: Fri Jan 24, 2003 10:31 am    Post subject: Reply with quote

Novice

Joined: 18 Dec 2002
Posts: 19
Location: UK Hursley

Quote:
What version of MQWF are you using?

I use 3.3.2 no CSD. Is _State a member of output container of the activity? I couldn't see it though. Maybe that's the reason why the transition condition wasn't accepted. By the way, is _State the same as _State()?

Cheers,
Jenny
Back to top
View user's profile Send private message
jmac
PostPosted: Fri Jan 24, 2003 10:40 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

_State() is a Builtin function added w/ V 330 I believe.

_State is not valid.

Look at the doc in Buildtime by using the Help button and you can see the syntax.
_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » restart an activity after it expires
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.