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

task container to workflow container binding

Former Member
0 Likes
1,450

Hi all,

I have a requirement to send mail to department responsible of a quality notification as soon as it is created from defects recording.

I am using sendmail step for this but since it doesnt have agent determination using rule, I am forced to create a background step which captures the value of department responsible (IHPA-PARNR) and passes on to a element in workflow container. The idea was I could later use the value of this container element in my send mail step which follows.

For this, I have defined a background step in my workflow template. The method in the standard task of this step refers to a function module.

The function module takes quality notification number as input (QMEL-QMNUM) and outputs the partner number (data type IHPA-PARNR).

I want to capture this partner number into my workflow at runtime. For this I defined a workflow container element refering to IHPA-PARNR so that it can bind to the export parameter of the task, which gets the value from method.

when I test my function module it works fine. BUt when I try to bind the task to my workflow, the binding between the elements refering to IHPA-PARNR gives error this error message:

" incompatible data type reference"

whereas the data type reference is same for both container elements.

Please help.

Thanks

kiran

1 ACCEPTED SOLUTION
Read only

ramki_maley
Active Contributor
0 Likes
1,157

Kiran,

I can only ask you to check your element definitions once again. You can also try by deleting the existing binding and the Workflow template container element and generate the binding autoamtically for your background step.

Cheers,

Ramki Maley.

7 REPLIES 7
Read only

ramki_maley
Active Contributor
0 Likes
1,158

Kiran,

I can only ask you to check your element definitions once again. You can also try by deleting the existing binding and the Workflow template container element and generate the binding autoamtically for your background step.

Cheers,

Ramki Maley.

Read only

0 Likes
1,157

Hi Ramki,

Many thanks for the reply. Actually, I don't know how but now the binding works fine from the task container to workflow container.

Now I am able to get the department responsible value into the workflow container via the background step. But I am not able to execute the send mail step which I defined immediately after this background step. The message it gives in workflow log is

" Work item 000113258867: Object 000113258867 method SWW_BI_EXECUTE_S cannot be executed"

Any Ideas why this is so.

Thanks

Kiran

Read only

0 Likes
1,157

The message normally means the Object-Method is erroring. It is most likely that the method SELFITEM-SENDTASKDESCRIPTION behind the Send Mail step is not able to resolve the recipients. Let me know what values you have in the 3 input field in Receivers block in the Mail tab in the WF definition.

Cheers,

Ramki Maley

Read only

0 Likes
1,157

Hi Ramki,

This is the binding from workflow to task container.

X => &EXPRESS&

G => &TYPEID&

&DEPTRESPONSIBLE& => &ADDRESSSTRINGS&

Here the DEPTRESPONSIBLE is the WF container element which gets the value of department (basically a org structure IHPA-PARNR) via a background task in the previous step.

And in the recepients list, I have given

recepient type : organizational object

expression : &DEPTRESPONSIBLE&

I think this is where the problem is. Because when I give workflow initiator as recepient, it works fine. But when I give the department responsible as expression as shown above it errors out.

It also works fine when I hardcode the value of department responsible in the recepients list (say 50001930)and give recepient type as Organizational object.

So the problem is it is not taking the value stored in the container element &DEPTRESPONSIBLE& as the recepient.

Any ideas.

Thanks a million.

kiran

Read only

0 Likes
1,157

Hi Kiran,

When you use an expression, the first two characters of the container element assigned must specify what type of Org Object is being passed (similar to structure SWHACTOR). In your case, if 50001930 is an Org. Unit, you should be passing it as 'O 50001930'.

HTH,

Ramki Maley

Read only

0 Likes
1,157

Hi Ramki,

That was really a great tip from you. It solved my problem.

Hats off to you.

Thanks a lot again.

Kiran

Read only

0 Likes
1,157

Kiran,

Glad to help. Please close the thread as your problem is now solved.

Cheers,

Ramki Maley