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 » How to know that activity that is runing ?

Post new topic  Reply to topic
 How to know that activity that is runing ? « View previous topic :: View next topic » 
Author Message
Surfer
PostPosted: Tue May 17, 2005 6:58 pm    Post subject: How to know that activity that is runing ? Reply with quote

Apprentice

Joined: 14 Jun 2002
Posts: 31

I am writting a java program that will be launched automatically from an automatic activity.
I that program I should now that I am in that activity and show it in dialog box.
Do I need to query _ACTIVITY from the process ? And how to get the uuid of the activity ?
Thank you once again.
Best regards
Back to top
View user's profile Send private message Send e-mail
elvis_gn
PostPosted: Wed May 18, 2005 3:48 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

I don't think I have got ur question correctly.

But if ur trying to get the name of the activity for which this Java application has run, u can do the folowing.

Is there some container field which uniquely identifies ur workitem, if there is, set it in the Description field of Activity.....

Set that field as the Java application parameter i.e args[0] for the application.

Next , with the workitem in hand, I am sure there is an API to get the activityName....i.e workitem.activityName() or something
Back to top
View user's profile Send private message Send e-mail
jmac
PostPosted: Wed May 18, 2005 6:56 am    Post subject: Re: How to know that activity that is runing ? Reply with quote

Jedi Knight

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

Surfer wrote:
I am writting a java program that will be launched automatically from an automatic activity.
I that program I should now that I am in that activity and show it in dialog box.
Do I need to query _ACTIVITY from the process ? And how to get the uuid of the activity ?
Thank you once again.
Best regards


You need to be much more specific.

You are going to launch a program from an automatic activity? How? Is this a UPES?

Your other questions are all based on the answers to the above.
_________________
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
Surfer
PostPosted: Thu May 19, 2005 9:57 am    Post subject: thank you Reply with quote

Apprentice

Joined: 14 Jun 2002
Posts: 31

Thank you.
It is a PEA.
A batch file that is in program property.
But there is an other question please; how to get the programID during the execution time of that automatic activity?
When trying to get the programID, workflow throws an exception and stops : NOT AUTHORIZED.

here is a piece of code :

Agent agent = new Agent();
try
{
agent.setLocator(Agent.LOC_LOCATOR);
}
catch (PropertyVetoException e1)
{
e1.printStackTrace();
}

try
{
agent.setName("agent");
}
catch (PropertyVetoException e1)
{
e1.printStackTrace();
}
System.out.println("1");
ExecutionService service = agent.locate("", "");
service.passthrough();
eAgent = agent.getExecutionAgent();
inContainer = eAgent.inContainer();
programId = eAgent.programID();//<----this is generating the NOT
//AUTHORIZED ERROR OR EXCEPTION.


thank you, all of you.
Back to top
View user's profile Send private message Send e-mail
vennela
PostPosted: Thu May 19, 2005 10:44 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Two things:
1. You can directly invoke a java program by workflow if you set the setting right on the program.
2. What is programID? What are you expecting? At the point where you are getting the error, you are in the java program called by ProgramID.
If you are talking about ACTIVITY, then you should be able to get it from the container.

The following is the code from the sample ActImpl supplied along with the product.

Code:

Agent agent = new Agent( );

      agent.setLocator( Agent.LOC_LOCATOR );
      agent.setName( "LOCAL" );

      ExecutionAgent pea = agent.getExecutionAgent( );

      if ( pea != null )
      {
        // get the input- and output container
        ReadOnlyContainer  input  = pea.inContainer( );
        ReadWriteContainer output = pea.outContainer( );

        // display all input container members
        System.out.println( "Input Container:" );
        DisplayContainer( input );

        // copy the data members from the input- to the output container
        CopyContainer( input, output );
        output.setLong("_RC", 0);

        // display all output container members
        System.out.println( "Output Container:" );
        DisplayContainer( output );

        // return the output container to the PEA
        pea.setOutContainer( output );
      }
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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 » How to know that activity that is runing ?
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.