Re: Using workflow relevant data and process formal parameters inside tool agents

Monique Maker <[email protected]>
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <[email protected]>
Hello Ran,

The advise of Shark team in similar situation was to callback Shark and get all info you need from its interfaces. To reach information in sucha a way you will need to call connect() method for most of Shark interfaces. Unfortunately, there is no credentials information in the ToolAgent to connect to Sahrk interfaces. You can use an account with administrative privileges but the definition of such account might rise security issues (as in our case). We sent a question to the Shark team what we can do if we do not want to use an administrative account, but two weeks later there is still no answer.

You can get the activity object in the following way:
 - get the assignment object by processID and assignmentID (passed as parameters to the ToolAgent). I think there was such method in ExecutionAdministration interface;
 - get the activityID from the received assignment object;
 - get the activity object (again - just look in Shark interfaces - there should be appropriate methods for this) based on processID and activityID;
 - get the WRD from the activity object.

There are some "shortcuts" you can use:
 - depending on your settings in Shark.config, the activity WRD may be the same as the one of the process. In this case you can get just the WRD for the process by getting the process object from the Sahrk interfaces;
 - you can directly read the WRD for the process definition - if your value is constant and it is defined at the process definition design time, you can use the methods from AdminMisc interface - I think these are getVariable...() ones.

Good luck on your research!

Best Regards,
Monique

Ran Efrat wrote:
> Hi Geeta,
>  
> Thanks for your reply.
>  
> The reason for not wanting to use only the AppParameters[] is the following:
> As I understand, and observed when debugging the process, the 
> AppParameters array contains only the application formal parameters and 
> their actual values (In addition to the Extended Attributes section of 
> the application in index [0])
> This forces me to define every possible parameter that my tool will ever 
> need to use as an application formal parameter.
>  
> For example, I've created a toolagent for running Unix Shell scripts. 
> This tool agent has one parameters that is always needed - the script name.
> There are parameters that I keep on the workflow context that I may or 
> may not need my tool agent to use depending on the specific activity.
> I don't want to pass them every time I call the tool because they are 
> not always needed.
>  
> This is why I'm looking for a simple way of accessing the workflow 
> context data.
>  
> You mentioned that I can get this info from an Activity object but I 
> don't see one that is passed to the toolagent.
> Is there any other way to get it?
>  
> Thanks
>  
> Ran
>  
> 
> ------------------------------------------------------------------------
> *From:* [email protected] [mailto:[email protected]]
> *Sent:* Wednesday, August 10, 2005 5:23 PM
> *To:* [email protected]
> *Subject:* Re: {Spam?} [shark] Using workflow relevant data and process 
> formal parameters inside tool agents
> 
> 
> [email protected] wrote on 08/10/2005 10:09:58 AM:
> 
>  > Hello,
>  >
>  > I need to use parameters from the workflow relevant data and the
>  > process formal parameters in my tool agent code.
>  > I saw that the AppParameters[] array passed to the tool agent only
>  > contains parameters that are defined as the tools formal parameters
>  > and their actual values.
>  > Is thee any way of getting other parameters in the workflow context?
>  > (read only access is fine).
> 
> If you have access to an activity object then you can get the map 
> activity.process_context(). This can give you access to the wrds... But 
> why would you not want to use the AppParameters[]? It seems to me that 
> is their function...
> 
> Regards,
> Geeta
> The information contained in this message is proprietary of Amdocs,
> protected from disclosure, and may be privileged.
> The information is intended to be conveyed only to the designated 
> recipient(s)
> of the message. If the reader of this message is not the intended recipient,
> you are hereby notified that any dissemination, use, distribution or 
> copying of
> this communication is strictly prohibited and may be unlawful.
> If you have received this communication in error, please notify us 
> immediately
> by replying to the message and deleting it from your computer.
> Thank you.
>
message-footer.txt (text/plain, 271 B)
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.