Re: Activity scope variables

Monique Maker <[email protected]> Thu, 11 Aug 2005 16:08:00 +0300
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <[email protected]>
Hello Gianfranco,

Sorry, it seems I misunderstood you.

It is difficult to imagine why you will need different values of one and the same variable at different steps (activities) of your process, while these values are not managed by the workflow process. Please explain your problem in more details.

Meanwhile, I can suggest several "solutions":
 - Use a tool agent to do the tasks for you (this seems inappropriate in your case but you may re-think);
 - As you know the process and the assignment, you can identify (a lillte tricky) the activity by its _definition_ ID and you will not need the "identification" variable anymore.

Probably I will be able to propose more appropriate solution if I know your problem in more details.

Regards,
Monique

Gianfranco Boccalon wrote:
> Hi Monique,
> thanks for your reply.
> 
> You gave me an alternative way if I use a JavaToolAgent, but there is an 
> alternative if I dont use any agent ?
> Suppose for example that I ask to shark (with Java code) for the 
> activities that my user have to complete, and analizing some parameter 
> of the activity I execute different tasks to complete the activity. All 
> this through the Shark API, called by my code.
> 
> What do you suggest in this case ?
> 
> Gianfranco
> 
> 
> 
> Monique Maker ha scritto:
> 
>> Hello Gianfranco,
>>
>> You can change the value of some variable during the process execution 
>> if it is appropriate in your case. I think that you cannot define 
>> variables for activity or set different value for a process-level 
>> variable for each activity in process definition design time.
>>
>> However, it seems that you need to send some parameters to a tool via 
>> JavaToolAgent. In this case you can do something else: you are not 
>> forced to use only WRD as actual parameters - supply for the 
>> corresponding parameter a hardcoded value, instead of WRD:
>> - Define your tool, lets say with the following parameters: param1, 
>> param2, myVariableConstant;
>> - Define appropriate workflow application to call this tool;
>> - At each call to the corresponding workflow application supply 
>> someting like:
>>  = activity1: WRD1, WRD2, "I want it in this way";
>>  = activity1: WRD3, WRD4, "I want it in that way";
>>  = activity1: WRD5, WRD6, "I want it in some other way";
>>
>> Unfortunately, this solution has some limitations:
>> - you cannot use the corresponding paramer in "out" mode;
>> - you can supply only simple values - string, integer, date, ... There 
>> is no way to supply some user-defined Java objects.
>>
>> Regards,
>> Monique
>>
>> Gianfranco Boccalon wrote:
>>
>>> Is it possible to have "Activity" scoped variables, accessible by 
>>> Java code ?
>>> I need to associate some parameters to some activities, but I dont 
>>> find how to in the documentation.
>>> I can define the parameters as "process parameters", and use them 
>>> through the process context, but i'd like to use the same name for 
>>> these parameters with different values for different activities.
>>>
>>> Some suggestions ?
>>>
>>> Regards
>>> Gianfranco Boccalon
>>>
>>>
>>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> -- 
>> 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
>>  
>>
>
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