cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem using workflow - Agent not ready

Former Member
0 Likes
2,937

Dear all, i'm not a workflow expert. I've created a workflow that works correctly when i test it using transaction SWDD, but I have an error of "no agent ready" when i process it using fm SWE_EVENT_CREATE.

the task is defined in this way:

Agent Expression: &_WF_INITIATOR&

but I also try this:

Agent User : ACNDEV (my user)

....and also I try to leave the agent blank.

I call the workflow rasing the event "CREATED" in that way:

VA_CREATOR-OTYPE = 'US'.

VA_CREATOR-OBJID = SY-UNAME.

CALL FUNCTION 'SWE_EVENT_CREATE'

EXPORTING

objtype = 'ZTESTFLOW'

objkey = 'ZTESTFLOW'

event = 'CREATED'

CREATOR = VA_CREATOR

TABLES

EVENT_CONTAINER = wi_container

The workflow start but at first task it is stopped with the message "No agent ready".

I already have try in different way, but i don't find any solution.

Anybody can help me ?

Davide

View Entire Topic
bpawanchand
Active Contributor
0 Likes

Hi

The possibilities are

1. Instead of making use of the SWE_EVENT_CREATE try to make use of the SAP_WAPI_CREATE_EVENT function module.

2. Try to refresh the organizational assignment from SBWP transaction on menu SBWP-> SETTINGS--> WORKFLOW SETTINGS -


> Refresh organizational environment.

I am sure that when ever you are trying to create or raise a event then it is not mandatory that you have to make the workflow template as general task.. but yes you have to maintain the agent assignment if you want to start the workflow directly like by using SAP_WAPI_START_WORKFLOW.

Also if you are facing this issue with some standard task but not with the workflow template then it is a problem with the agent assignment. in that case make sure that the proper agent assignment settings are maintained for the respective standard task. as mentioned in the above posts.

Regards

Pavan

Former Member
0 Likes

Dear all, i checked all these issue, but the WF doesn't work(the message is always the same "AGENT NOT READY"):

1) all the task are defined as general task

2) the event exist (in fact the workflow start but it is stopped at the first task with the error)

3) the key of the object is the same type that i use in the function module

4) the object is not delegated

5) the agent in the task is set in that way:

Expression : &_WF_INITIATOR& (is it correct ? )

5) I put the new function module SAP_WAPI_CREATE_EVENT.

There is still the problem. Have you got other idea ?

Davide

Former Member
0 Likes

Hello,

Is the error message "No agent ready" or "Agent not ready" or something else? "(No agent) Ready"? Be precise.

&_WF_INITIATOR& should be right, but just use the dropdown box to choose initiator to be sure.

What sort of task are you calling? How do you know that it's a General task?

As always, try SWU_OBUF.

Try generating the event with SWUE, see if it makes a difference.

regards

Rick Bakker

hanabi technology

Former Member
0 Likes

Hi Rick,

The text message is "(No agent) Ready".

&_WF_INITIATOR& --- I take it from the list using the drop down, so the syntax is correct.

SWU_OBUF I've already done it, but without any result.

I try also to create the event using transaction SWUE but the result is the same.....the workflow start but I always have the message "(No agent) Ready".

Davide

Former Member
0 Likes

HI,

You get this error message when task is not set as general task.

Ensure that task is general task & the container &_WF_INITIATOR& is populated properly.

Regards,

Raj

Former Member
0 Likes

Hi grosso,

Where you got this message 'No agent ready'?

If you are using &_WF_INITIATOR& as the agent and task is a general, then it should have the agent.

I think you got this message in Graphical workflow log.

You have to go to SWi1 transaction and click the button at 'Ready'. Or else go to transaction SBWP and check the work item.

It will be there in the inbox.

Thanks,

Viji.

Former Member
0 Likes

Hi, you're right. I've this message in the Graphical workflow log.

In transaction SWi1 i see 2 work-item:

1) Dialog Step The name of the task Status:Ready: Agent not found

2) (Sub)workflow The name of workflow Status:Started Agent: ACNDEV (my user) Author:USACNDEV

If I process the first then the workflow finished correctly. My question is: why this is not automatic ? Why at first step the Agent is not found ?

Regards,

Davide

Former Member
0 Likes

Hi Davide,

Each workflow will create the top work item ID at run time and each task's in the workflow, will create a separate work items at run time.

So if you have one workflow and one dialog task, then at run time it will create a two work items.

top work item will represent the Workflow and the Dialog work item is representing the dialog task,

Dialog Task should have the agent to make the decision process. Once the approval is done, the workflow wil be compleetd automatically. That means the top work item ID will complete automatically.

Thanks,

Viji.

Former Member
0 Likes

Dear Viji, for me is clear, but wat i want is to avoid this dialog. I want to start the event and the run the wokflow automatically without approving anything.

Is it possibile ?

Thank you very much

Davide

Former Member
0 Likes

Hi,

Then you have to delete the task from the workflow.

Just right click at the dialog task in workflow template and choose 'Delete'.

Thanks,

Viji.

Former Member
0 Likes

Hi Viji, sorry I want to say....it's correct that there is the task because it is a step of the workflow(it run a metod BOR),but i want to run it without approving every time the agent.

This worflow needs to run in background so i don't want to do ech time the step manually....

I don't kwow if it's clear wat i try to explain.

Thanks

Davide

Former Member
0 Likes

Hi Davide,

If the workflow template has any dialog task, then it will go for an approval.

Even if there is no approver, then also workflow will go for an approval.

My suggestion is, if you dont want the approval for your workflow, then in the workflow design itself you have to remove the dialog task. So that it will not go for an approval.

If its not possible to remove from the task workflow template, then you can make use of deadline monitoring option with one minute of time interval.

But if you use deadline monitoring also, the work item will go to user's inbox and waiting for 1 min, then only it will complte.

Try to remove the approval task from workflow design itself.

If you delete the task from workflow, the task will not be deleted from the system. Its just removed from the workflow template only not from the system.

Thanks,

Viji.

Former Member
0 Likes

Dear Viji, sorry and thanks for your time, but i'm not a workflow expert.

My requirement is that I have to run in my workflow 2 custom metod that are related to 2 BOR.

So, what I have done is:

1) create the bor object

2) create a workflow with 2 task (that you are calling dialog tasks) that in sequence call the 2 methods. If you say to me to remove the task, is the same that you say to me to cancel the workflow

3) the problem is that when the WF stard the 1st task it's stopped waiting for the action.

4) what i have to do to call this 2 task without asking anything ? I have to create the task in a different way? (not dialog task, but somthing different.....I'm not expert...).

I cannot believe that if I have a WF that needs to start at midnight at that time the user must approve the task.

I don't know if it is clear my concept,

Davide

Former Member
0 Likes

Hello,

I had a similar problem before and setting the tasks to general wasnt enough.You can try to set the workflow to general.

Enter SWDD and select Basic data from the menu. Then go to agent assignments and set the workflow to general.

Former Member
0 Likes

Hello,

You say:

"The text message is "(No agent) Ready"."

You would get better and quicker help from this forum if you write down the actual

error message at the beginning of the thread (instead of halfway through it!)

This is not an error message. There is nothing wrong. It does not mean the task has

to be set to General Task and the workflow itself certainly doesn't have to

be set to General Task.

You will see this message in the graphical log. It just means the task is Ready

and that no agent has executed it yet.

If you are having any further problems could you please summarise, this thread is getting too long!

regards

Rick Bakker

hanabi technology

Former Member
0 Likes

Dear Rick, sorry for the misunderstanding.

I summerize.

you're right, the message is "(no agent)" ready in the graphic flow.

Probably as you said is not an error (i'm not a workflow expert) , but manual operation is needed to approve the task(and assign the agent).

I don't want the manual operation. I want it automatic.

Is it possibile ?

Regards,

Davide

bpawanchand
Active Contributor
0 Likes

Hi,

Can you please check in the basic data of the workflow that is that workflow template is defined as a ADHOC workflow where or REVIEW workflow where there is a possibility that you need a manual intervention.

1. Got Basic Data of the workflow

2 Click on Version dependent workflow tab.

3. There will be a tab with name may be workflow there you can find the various option like ADHOC workflow review workflow etc.. check if any of the either mentioned check is enabled.

Regards

Pavan

Edited by: Pavan Bhamidipati on Jun 1, 2011 8:44 AM

Former Member
0 Likes

Hello,

"I don't want the manual operation. I want it automatic.

Is it possibile ?"

Yes, simply make it a background task and WF-BATCH will execute it immediately.

What is it supposed to do?

regards

Rick Bakker

hanabi technology

Former Member
0 Likes

thank you very much Rick , this is what I was trying to do.

Creating the task in background it works fine.

Davide

praveen_kumar194
Active Contributor
0 Likes

HI ,

When you define that task , try to change it to background job so that there is no need of any agent. it will be executed ib background.