Tuesday, August 2, 2011

Where's My Journal Voucher JV Stuck ?

--------------------------------- Solution I -------------------------------------------

In this example, the workflow failed originally because the journal preparers supervisor did not have an employee name assigned to the user.
Depending on the case, the corrected data must be entered in the steps below:

1. Verify the Workflow process is not there

This can be verified in Workflow (monitor):

Workflow - Find Processes
Item Type = Journal Batch
Process Name = GL Journal Approval Process

Or:

select *
from wf_notifications b
where b.subject like '%ournal batch%' -- Journal Batch Name
or begin_date like to_date ('09082005','dd/mm/yyyy')
or b.recipient_role like '%Approver_name%'


Resolution could be one of the following solutions:-
1. Approve the batch:-

update gl_je_batches
set approval_status_code = 'J'
where je_batch_id = &batch_id

To automatically approve the batch, set the approval_status_code in GL_JE_BATCHES to 'A'. This
will make the batch immediately available for posting.

or

2. To send the batch back for approval through workflow, set the @approval_status_code to 'R'.

--------------------------------- Solution II -------------------------------------------

In this example, the workflow failed originally because the journal preparers supervisor did not have an employee name assigned to the user.
Depending on the case, the corrected data must be entered in the steps below:

Select the 'Workflow Administrator responsibility'.
Note that the Workflow Administrator Role must be assigned to the User or Responsibility that is doing this.

Open the 'Status Monitor' screen (Administrator Workflow > Status Monitor)

---------
Query the workflow in the current context. To know the parameter values to use,
(Journal Approval uses the following values:
the item_type is 'GLBATCH'.
the item_key value starts with the JE_BATCH_ID value from gl_je_batches table.
the user_key is the Journal Batch Name (this is case sensitive).
Use the following SQL to obtain the item_key and item_type for a Journal Batch
Approval workflow:

SELECT item_type, item_key
FROM wf_items
WHERE user_key = '';

The tables where you can find relevant data using the above references are:

GL_JE_BATCHES
WF_NOTIFICATIONS
WF_ITEMS
WF_ITEM_ACTIVITY_STATUSES
WF_PROCESS_ACTIVITIES
)

Select the workflow with error from the list and open the 'Activity History'.

---------
Select the failed activity and click the 'Update Attributes' button.

---------
Update the missing attributes of the failed activity, for example:
- preparer id = employee id from the fnd_user table (-1 shows that an assignment was missing)
- Approver Name = Preparer's supervisor's name (i.e.Person Name to be Attached for the supervisor User)
- Approver Display Name = Preparer's supervisor's name (i.e.Person Name to be Attached for the supervisor User)

---------
Select the errored out activity and click on the 'Rewind' button.
Clicking on rewind button opens a page listing all the completed activities of this workflow and gives you a choice to select the activity from where the workflow should be rewound.

Select the first activity of the workflow as the point from where it is to be rewound.
A confirmation was received that the workflow was rewound .

Requery the workflow to see the latest status.
The notification must have been sent to the approver.

No comments:

Post a Comment