on 07-09-2010 8:39 AM
Dear all,
I have created a workflow with an activity step that uses business object SELFITEM and method SENDTASKDESCRIPTION with rule AC00000168.
On executing the WF, the workitem successfully goes to right agent.
But, when the agent executes the workitem, it goes to error state.
In the workflow log, I get the error message as "Exception occurred Error handling for work item 000000968991 eeom division 09.07.2010 - 11:28:52 " with exception 0,error type 1 and message 0.
Following is binding details between workflow and task container.
&MANAGER& -> &ADDRESSSTRINGS&
&_ATTACH_OBJECTS& -> &ATTACHMENTS&
&ATTENDANCEINSTANCE& -> &ATTENDANCE&
&EXPRESS& -> &EXPRESS&
&LANGUAGE& -> &LANGUAGE&
&LINEWIDTH& -> &LINEWIDTH&
&TYPEID& -> &TYPEID&
&SELFITEM& -> &_WI_OBJECT_ID&
In the above binding parameter,MANAGER. is a workflow container of ABAP data dictionary type WFSYST-AGENT where the rule's agent is collected.
Please suggest why the work item at agent inbox on execution goes error for which I will be grateful.
Thanks and regards,
S.Suresh
You have to Concatenate US in front of the SAP User id. in container element ADDRESSTRING.
Thanks
Arghadip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
"AC00000168 in the task which uses the business object SELFITEM-SENDTASKDESCRIPTION"
AC00000168 is a rule used for getting the manager of an input user. It has nothing to do with SELFITEM-SENDTASKDESCRIPTION.
I assume your step is trying to send a mail to an employee's manager after a deadline has expired?
Test out the rule separately in PFAC with the same inputs.
regards
Rick Bakker
Hanabi Technology
Hello Rick Bakker ,
Thank you so much for your reply.
Actually, I want to send a message to employee's manager.That's why I use the rule AC00000168 in the task of BOR type SELFITEM-SENDTASKDESCRITION.
The work item goes to the right agent.But, when the agent executes the workitem, it goes to error state.
I have binded the rule result as follows ;
&MANAGER& <- &_RULE_RESULT.AGENTS&
Then I pass this to as follows
&MANAGER& -> &ADDRESSSTRINGS&
When I executed the rule at PFAC, with employee personnel number and object type "P", it returns 2 correct entries as follows :
P 00060000 Jaiswal Jaiswal Manoj
US EEOMDN division eeom division
So, both the entries belongs to same manager.
Please suggest where I go wrong.
Thanks and regards,
S.Suresh
Hello,
You say:
"The work item goes to the right agent"
If that's so then there's no problem with the agent determination, it must be something else.
Whenever I send a mail in a workflow I don't send it to a particular agent to send to someone else, I have WF-BATCH send it in the background. Do you have a reason for having a user execute this step?
regards
Rick Bakker
Hanabi Technology
Hello RickBakker !
Thank you so much for your reply.
I want to use rule in the custom task whose BOR is SELFITEM-SENDTASKDESCRIPTION.
Though the right agent receives the work item , when he executes it, it goes to error state.
In workflow log, the agent detail is not populated despite it reaches the right agent.
&MANAGER& <- &_RULE_RESULT.AGENTS&
Here, &MANAGER& is not populated with agent name.But, the workitem goes to right agent.
&MANAGER& is of type WFSYST-AGENT.
Please suggest for which I will be grateful.
Thanks and regards,
S.Suresh
Edited by: Suresh Subramanian on Jul 9, 2010 9:25 PM
Hello RickBakker !
Thank you so much for your reply.
Just I want to send some intimation to employee's manager.
The standard mail step does not have the functionality to incorporate rule.So only I decided to create custom task with BOR SELFITEM-SENDTASKDESCRITION to integrate rule therein.
Please suggest why the &MANAGER& , in the binding sequence &MANAGER& <- &RULE_RESULT.AGENTS& ,
is not populated with agent name though the workitem goes to the right agent to become erroneous on execution.
Thanks and regards,
S.Suresh
Hello,
There's a big difference between using a SendMail step and using a step that calls SELFITEM-SENDTASKDESCRIPTION.
With SendMail, you're specifying the recipient.
With SELFITEM-SENDTASKDESCRIPTION, you're specifying the agent who is to execute the step, and you have to pass in the recipient in the binding.
What I would do is use a SendMail step and have a preceding step which fills a container element with the name of the supervisor. Have that preceding step call a task (which you'll have to create) to call a method (which you'll also have to create) of the underlying class or BOR object which determines who the supervisor is.
You can determine who the supervisor is (in the method) by calling fm RH_GET_ACTORS with act_object = 'AC00000168',
or by calling fm SWX_GET_MANAGER.
regards
Rick Bakker
Hanabi Technology
Hello Rick !
Thank you so much for your fruitful solution.
Also, I am deeply sorry for delayed reply.
I used the function module 'SWX_GET_MANAGER' in the custom method as you suggested.
BEGIN_METHOD FINDMANAGER CHANGING CONTAINER.
DATA:
EXTENDEDOBJECTID TYPE OBJEC-REALO,
addresstype like soxna-type,
RECIPIENTADDRESS TYPE SOXNA-FULLNAME.
DATA:
ac_container like swcont occurs 0 with
addressstrings like soxna-fullname occu
SWC_GET_ELEMENT CONTAINER 'ExtendedObjectID
addresstype = 'G'.
ac_container-element = 'OBJID'.
ac_container-tab_index = '000001'.
ac_container-elemlength = '008'.
ac_container-type = 'N'.
ac_container-value = EXTENDEDOBJECTID.
append ac_container.
ac_container-element = 'OTYPE'.
ac_container-tab_index = '000001'.
ac_container-elemlength = '002'.
ac_container-type = 'C'.
ac_container-value = 'P '.
append ac_container.
CALL FUNCTION 'SWX_GET_MANAGER'
TABLES
ACTOR_TAB = addressstrings
AC_CONTAINER = ac_container
EXCEPTIONS
NOBODY_FOUND = 01
OTHERS = 02.
CASE SY-SUBRC.
WHEN 0. " OK
WHEN 01. " to be implemented
WHEN OTHERS. " to be implemented
ENDCASE.
loop at addressstrings.
if addressstrings(2) = 'P '.
delete addressstrings.
endif.
endloop.
move addressstrings to recipientaddress.
SWC_SET_ELEMENT CONTAINER 'RecipientAddress' RECIPIENTADDRESS.
END_METHOD.
Therafter, the values accumulated at RECIPIENTADDRESS is passed to the workflow container(SOXNA-FULLNAME) of SENDMAIL step.
Also, I thank every one who contributed fruitful suggestions to solve my problem.
Thanks and regards,
S.Suresh
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.