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 » Automatic activity

Post new topic  Reply to topic
 Automatic activity « View previous topic :: View next topic » 
Author Message
elvis_gn
PostPosted: Wed Mar 16, 2005 4:26 am    Post subject: Automatic activity Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi,
I have defined an activity which is assigned to a user "USER".
The activity is to start automatically and end automatically too.The USER has been given admin privilages.

When the data container comes to this activity it fails to start automatically.It is in ready state....On some searching i came to know that the user needs to be logged in to make the program start automatically....

So what i'm doing now is that,I first logon the USER using Java api's, and then submit the inContainer to it.....but this is not working too.....If i do a login from the WF client for the first time and then use these api's, it starts working....but i cannot expect someone to do this in a realtime scenario after every server crash,.....

Can someone suggest where i could be going wrong......

Is it possible to avoid this USER assigning to the workItem.....

Also,when the system shuts down or something this activity will get completed successfully. How do i prevent this, and make it start again.
Back to top
View user's profile Send private message Send e-mail
jmac
PostPosted: Wed Mar 16, 2005 5:43 am    Post subject: Reply with quote

Jedi Knight

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

It is recommended to use UPES for all automatic activities. This will get you around having to have the user logged in.
_________________
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
elvis_gn
PostPosted: Wed Mar 16, 2005 6:08 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

ok, all i know about UPES is that it stands for user-defined program execution servers....

Can u tell me where i can learn about implementing this,or if u could take the time, can u tell me how to implement running a java program in an activity which should start and end automatically.

Anything would be helpful.thx.
Back to top
View user's profile Send private message Send e-mail
mqmhr
PostPosted: Wed Mar 16, 2005 6:20 am    Post subject: Reply with quote

Centurion

Joined: 28 Dec 2004
Posts: 105

A crude explanation : You have to define your task as a UPES task and associate the UPES with a queue. When the activity executes in Workflow, an ActivityImpl message will be put into this queue. You could run your java application to get this message and retrieve the input container values from it. After processing the message, populate the output container values inside an ActivityImplResponse message and put it into the queue EXEXMLINPUTQ. The activity will resume with its output container values sourced from the message you sent.

You could use the UPES Framework classes in your java application. These come as part of Workflow installation or as a supportpac.

Refer to Chapter 33 of the Programming Guide to know how to implement an UPES, XML interace and error handling.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Thu Mar 17, 2005 2:45 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

I tried the UPES functionality but have realised that i cannot have mutiple cmd's running for each message( for each Java program that i will have to run) and also since the programs have a dynamic timeout i cannot use the initiation queue cmd for each program.

Can some one tell me what i could be doing wrong in the present scenario...

I have three activities and a user for each.....2 activities have manual start and the third is automatic.....
I am logging in all the three users and get a successful logon2....

Both the manual activities are running properly but this automatic activity fails to start automaticaly...the workItem comes there and is in Ready state......
There is nothing wrong with the code since, if for the first time i keep the user logged on( of the automatic activity ) the workItem starts automatically......
Is this a dependancy..??
Is there something i havent set ???
I have set the program must run unattended and the start automatic features
Back to top
View user's profile Send private message Send e-mail
Ratan
PostPosted: Thu Mar 17, 2005 11:07 am    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

Quote:
There is nothing wrong with the code since, if for the first time i keep the user logged on( of the automatic activity ) the workItem starts automatically......


So When do you see the problem?

Do you have any exit conditions set?
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
elvis_gn
PostPosted: Fri Mar 18, 2005 2:41 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

to produce a real life scenario,i stop and start the services to make sure no users are logged in......

After this i run the workflow using the Java Api's....

The activity supposed to start automatically receives the workItem in ready state but does not start the Java application set in the program implementation for this activity.....

Note : the Java application runs if i go to the workflow client and log in the user for the first time....

My logon statement is :

service.logon2( userid, password, SessionMode.PRESENT, AbsenceIndicator.LEAVE)

Are any of the settings a problem ?????
Back to top
View user's profile Send private message Send e-mail
jmac
PostPosted: Fri Mar 18, 2005 5:32 am    Post subject: Reply with quote

Jedi Knight

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

What is the exact logon command you are using in the Java program?
_________________
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
Ratan
PostPosted: Fri Mar 18, 2005 11:38 am    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

If you donot have a PEA running for the user assigned to an automatic activity ( when not using UPES), there is no way for the activity to run. So I believe what you see is how Workflow works.

To get around this, keep the PEA for that user always running, or BETTER YET USE A UPES.
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
elvis_gn
PostPosted: Sat Mar 19, 2005 3:20 am    Post subject: Simultaneous Logons for one user ???? Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi,
is it possible for one user to be logged in multiple times into the workflow, at the same time........

Currently i'm using =>

service.logon2(userid, password, SessionMode.DEFAULT, AbsenceIndicator.RESET)

Can it be done,if yes,how , plz help ????
Back to top
View user's profile Send private message Send e-mail
jmac
PostPosted: Sat Mar 19, 2005 5:31 am    Post subject: Re: Simultaneous Logons for one user ???? Reply with quote

Jedi Knight

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

elvis_gn wrote:

service.logon2(userid, password, SessionMode.DEFAULT, AbsenceIndicator.RESET)


Using this command you can log on any user multiple times. But that user will not be running automatic activities.
_________________
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 » Automatic activity
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.