cancel
Showing results for 
Search instead for 
Did you mean: 

How to keep user decision workitem in user inbox untill particular condition is occured?

former_member201532
Participant
0 Kudos


Hi,

I am working on Journal entry workflow .

i am using user decision step with Approve and Reject Button. but when user try to Reject particular document number i need to check condition period open or closed.

if period is closed then i need to display error message. is it possible to display error message ?

untill the period is open by adminstrator .user must cannot Reject Document number .

when period is open he can Reject . so untill that period is open i need to keep that user decision work item in user inbox only.

Please help how to acheive this requirement.

Thanks,

phani

Accepted Solutions (1)

Accepted Solutions (1)

I042439
Employee
Employee
0 Kudos


Hi Phani

Another approach:

  1. Create Subtype of BO DECISION, say ZDECISION and maintain delegation between the two.
  2. Create method ZDECISION.ZPROCESS by coying DECISION.PROCESS.
  3. In ZPROCESS, add your code to check the periods and exit accordingly (or issue message)
  4. Instead of calling task TS00008267 for the decision, create a custom task.

  5. That task calls DECISION.ZPROCESS (not ZDECISION as we have maintained delegation).

Regards,

Modak

Answers (6)

Answers (6)

former_member201532
Participant
0 Kudos

Hi Anjan,

Thanks for your Replay.

can we display error message in user decision work item screen .

Thanks,

phani.

anjan_paul
Active Contributor
0 Kudos

Hi,

  Try to raise error message in workitem exit based on state of the step

former_member201532
Participant
0 Kudos

Hi Anjan,

when i raise the error message in progam exit of user decision step . will that error message display on user decision screen .

can you please explain it clearly so it is very help full to me.

my requirement is to display error message when user clicks on reject button by checking condition .

Thanks,

phani .

former_member201532
Participant
0 Kudos

Hi,

can you please tell how to display that error message in user decision step .

when use secondary method to check condition in user decision step. how we know that particular condition is occurred . is there any bindings required.

if i am using dynamic user decision with 3 outcomes and if i hide one outcome the user can see only 2 outcomes . will that 3 outcome path also gets deleted in workflow or not ?

Thanks,

phani

anjan_paul
Active Contributor
0 Kudos


Hi,

   You have to add method in the BO used in workflow as container element to raise error message after hit the table for condition . After that use the the BO container in the secondary method.

former_member209217
Active Contributor
0 Kudos

Hello Phani,

Better to go for a secondary method for this user decision step.Alternatively we can also use before method. This will get triggered just before the execution of the work item where as secondary method gets triggered simultaneously with the user decision. So put a check inside the before method and if the check fails raise an error message .

Another good way is to make use of Dynamic user decision. Using this we can hide out the options available in user decision using a predefined condition.

Give some reasonable text at the bottom mentioning the reason for making that option unavailable.

For more details check out the below

1648822 – Dynamic user decision – There will be an exit which allows you to dynamically determine which user decision options should be displayed.

Best Regards,

Lakshman.

former_member201532
Participant
0 Kudos

Hi,

Approve can happen at any time period open or close.

Reject Can happen only at period open only.

if user want to reject and if period is close then we need to send mail to adminstartor open period.after opening of that period user can reject that document.

so untill that period is open we need to keep that user decision step in his mail and we need to check period is opened or not.

but how to check that condition period is opened or close by adminstrator every time.

Thanks,

phani.

Former Member
0 Kudos

Hi,

even if you place a activity step before user decision to check and get a flag if the period is open, it is likely that period gets closed when user takes action on work item after some days. So getting the period status in some container flag is not useful.

Now, in your reject branch of user decision step you must be having an activity step with your csutom method to perform an action on ur FI doc. based on your business requiment. So in this activity before performing the business action check if the period is closed or open. if it is closed then return some flag from method to workflow. in your workflow send an email to admin. if period is closed. YOU NEED TO PLACE THESE STEPS INCLUSING USER DECISION STEP IN A LOOP UNTILL STEP TYPE. so that it keeps on running and sending the workitem untill the doc. is approved or period check flag is not set (i.e. doc. rejected since period was open).

Regards,

Ibrahim Ansari

anjan_paul
Active Contributor
0 Kudos

Hi,

   Use of Secondary method can do your requirement. At Rejection you check for close period and raise  a error message.

  Another option you take a loop with user decision, after rejections you add step to raise a error message and again send user decision step  . 

Private_Member_46505
Active Participant
0 Kudos

Hi phanikumar yennamani,

You can try out secondary methods concept in the User decision.

What I understand is you can approve any time however rejection should happen only if period is open?

Or you want the decision of either Approve/Reject to happen only If its Open ?

former_member227140
Active Participant
0 Kudos

I am not sure but you can work out this issue like,

if user can only approve or reject if period is open then before user decision create a step (create method in Business object which will check  period is open or close and export a value 'X' if period is open ) using this flag 'X' you can then create a workflow container whose value can be null or 'X' based on output of previous method.

if its X then call user decision step . but in this case user wont get a work item until period is open for document.