cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow calling

Former Member
0 Kudos

Hi,

I have created a template with 2 steps.

1. An activity which runs a BOR method.

2. Send mail.

After executing the activity I want a mail in my inbox.(activity is not background).

Now I need to cal this template in one of my program.

Can some one give me sample code to cal the WF template in my prgm such that i will get a text mail to my inbox. Im not using any events to trigger the WF.

Thanks.

View Entire Topic
former_member185167
Active Contributor
0 Kudos

Hello,

Search for SAP_WAPI_START_WORKFLOW in this forum.

regards

Rick Bakker

Hanai Technology

Former Member
0 Kudos

Hi Rick,

I have tried with SAP_WAPI_START_WORKFLOW with my WF number 'WS88000199'.

But am getting return code - 4 with an error message You are not one of the possible agents of task 'WS88000199'

But my task is general task.

Thanks.

former_member185167
Active Contributor
0 Kudos

Hello,

Have you set WS88000199 to General task as well?

regards

Rick Bakker

Hanabi Technology

bpawanchand
Active Contributor
0 Kudos

Two reasons are possible

1. YOu might not have the authorization to start the workflow

2. Go to BAsic data of the workflow and try to make the workflow as general task ( CTRL + F8 ---> SHIFT+F9 select the GEneral task and then try to execute

Former Member
0 Kudos

Hi Pavan,

I tried this.

I got a work item in the inbox. which need to be executed.

But i want a text mail.

Thanks.

bpawanchand
Active Contributor
0 Kudos

You mean to say that, you don't want to receive the workitem but directly the MAIL in the inbox,

If this is the case then simply make the task as background

Former Member
0 Kudos

Hi Pavan,

I tries it earlier only.

When the task is set to background, am not getting neither work item not mail. nothing is getting into inbox.

Thanks.

bpawanchand
Active Contributor
0 Kudos

SO i think the control is getting stuck in the methdo execution of the business object .

  • Did you check the log , I ean in SWWL you can check at which step the workflow is getting hanged, i think the task is remaining in IN PROCESS status check the code and make the appropriate changes

former_member185167
Active Contributor
0 Kudos

Hello,

I think there may be something wrong with your mail settings.

Does WF-BATCH have an email address?

Are the mails appearing in SOST?

regards

Rick Bakker

Hanabi Technology

Former Member
0 Kudos

Pavan,

The status is completed in SWWL.

bpawanchand
Active Contributor
0 Kudos

Does the entire workflow is getting completed .

What is the receipient type you have selected in the mail step

I mean

  • Organizational OBJECT

  • WF INitiator

  • Email Addrress

If you are using the 1st one and in the EXPRESSION if you are sending the mail by using the SAP USERID then make sure that you append US to the SAP userid

Former Member
0 Kudos

Pavan,

am using the initiator.

bpawanchand
Active Contributor
0 Kudos

Try to select the USERID and give your Userid and check actaully the mail is getting triggered or not

Former Member
0 Kudos

hi

can u please give me some details with how is that happening

even i m trying to trigger thru FM SAP_WAPI_START_WORKFLOW'

But the WF is not coming to my inbox.