Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Has anyone implemented Program exits in Workflow?

vsubbakrishna
Participant
0 Likes
839

hi all,

i know we can capture workflow container values in the program exits.

but i need to manipulate/change the container values and pass the new container values back to the task from the class.

so how should i implement the binding and the class.

thanks,

Subba

also sandeep,

Request you to explain the First method using macros as i have not done this before.

say <b>import</b> :

field1

field2

field3

into the class

concatenate all the three into <b>field4 and export</b> it back to task.

so how should my class look like..

regards,

subba

5 REPLIES 5
Read only

Former Member
0 Likes
765

for this you will have to create a dummy method of a class and use the macros from <cntn01> to modify the contents. Probably you know this.

Note that only the variables created in workflow , that are not default can be set as export parameters.

get the required parameters as import parameters and export parameters of the method you create. Create a task out of that and insert it in the workflow definition.

Write logic inside the method such that... only if required, modify the contents else pass the same to export.. so that net effect is nil.

This is one method of creating program exits.

another method is what you are asking

add the class, shd have the interface IF_SWF_IFS_WORKITEM_EXIT in its definition.

Define its methods.

By default the task container will be available for the class to operate on. they will be public. so you can reference them in your method.

regards,

Sandeep Josyula

*Mark helpful answers

Read only

0 Likes
765

hi sandeep,

very helpful....

i have implemented the class using interface IF_SWF_IFS_WORKITEM_EXIT and able to read WF container.

By default the task container is available for the class to operate on...that is okay....but how to reflect changes back to WF..

thanks,

Subba

Read only

0 Likes
765

also sandeep,

Request you to explain the First method using macros as i have not done this before.

say <b>import</b> :

field1

field2

field3

into the class

concatenate all the three into <b>field4 and export</b> it back to task.

so how should my class look like..

regards,

subba

Read only

0 Likes
765

Task container is available for the class by default.

Use the macros to modify the contents. (I hope this will not be possible...if it is.. its fine then )

Instead create extra variable in task container of the object type, and assign the modified local object of the exit class to it. and do binding from task to workflow with the new declared variable.

in your example, declare field4 as export of the method in class and declare the method as public. that should do.

regards,

Sandeep Josyula

*Mark helpful answers.

Read only

vsubbakrishna
Participant
0 Likes
765

Answered!!