Posts tagged "workflow"

CQ5.5: SlingException running workflowreport.html

Issue

If you are using the workflow report under /etc/reports/workflowreport.html it may return with an error 500 in the browser and the following exception:

org.apache.sling.api.SlingException:
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspExceptionInternal(JspServletWrapper.java:686)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:603)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:528)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:447)

Caused by: org.apache.sling.api.SlingException: An exception occurred processing JSP page /libs/cq/workflow/components/report/report.jsp at line 132
… 74 more
Caused by: java.lang.NullPointerException
    at org.apache.jsp.libs.cq.workflow.components.report.report_jsp._jspService(report_jsp.java:309)
    at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:497)
… 97 more

Reason

This problem can occur when a workflow model is deleted, but that workflow model had been used to start multiple processes, and therefore workflow statistics for that model exist.  This is a product issue and has been addressed in CQ5.6.

Workaround

As a workaround you can use the attached overlay for
/apps/cq/workflow/components/report/report.jsp
instead of the problematic
/libs/cq/workflow/components/report/report.jsp

workflow_report_overlay_40332-1.0.zip

The workaround will resolve the NullPointerException and the workflow report will display as expected, but there are still some unresolved exceptions in the server log. These will be resolved with the full product fix.

reference: (40332/CQ5-23798)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

CQ5.4: how to force a delay between workflow steps

Information

If you are using workflows in Adobe CQ5.4 you may wish to have a customized delay between certain workflow steps.  It is possible to cause a delay using the timeout functionality which has pre-defined values (immediate, 1h, 2h, 6h etc…), and then select the Auto Advance timeout handler to move the workflow to the next step.

In some cases you may also want to define your own delay intervals rather than use the pre-defined values.  This is possible in CQ5.4 by creating an overlay of:

/libs/cq/workflow/components/model/step/tab_common/items/timeout/items/timeout/options

to:

/apps/cq/workflow/components/model/step/tab_common/items/timeout/items/timeout/options

and then you can make a copy of one of the existing nodes (1h, 2h etc…), and change the values to suit your needs.  The value should be in seconds and not milliseconds.

This new value will then appear in the workflow step configuration dialog, under the list of timeout values, and the step will timeout after the specified interval.

reference: (37175)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 4.0/10 (4 votes cast)

LiveCycle ES: “ALC-UPG-040-005: Exception Migrating Workflow Tasks” Error while migrating the DB in LCM

Issue

When migrating from a LC7 to a LC ES server, you may receive the following exception during the “Migrating Essential Data” step in LiveCycle Configuration Manager:

ALC-UPG-040-005: Exception Migrating Workflow Tasks: [97,571]
com.adobe.livecycle.upgrade.UpgradeException: ALC-UPG-040-000: Internal error: ALC-UPG-040-000: Internal error:
ALC-UPG-040-005: Exception Migrating Workflow Tasks: [97,571]
at com.adobe.livecycle.upgrade.workflow.WorkflowUpgradePlugin.execute(WorkflowUpgradePlugin.java:320)
at com.adobe.livecycle.upgrade.workflow.WorkflowUpgradePlugin.migrateCriticalData(WorkflowUpgradePlugin.java:226)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.adobe.livecycle.upgrade.control.PhaseRunner.run(PhaseRunner.java:217)
at java.lang.Thread.run(Thread.java:595)
Caused by: com.adobe.livecycle.upgrade.UpgradeException: ALC-UPG-040-000: Internal error:
ALC-UPG-040-005: Exception Migrating Workflow Tasks: [97,571]

Reason

This will occur when a task has been started by opening a form in Form Manager, but a process was never initiated, probably because the user just closed the form again without submitting. The task has no corresponding entry in the TB_ASSIGNMENT table in the DB.

Solution

The solution in this case is to delete the task entry manually from the database, as it does not affect any running processes. This is a very rare case and should not show up at all in most installations. Here is an SQL statement you can use to search for such tasks in the DB before running LCM.

_____________________________________________

select * from tb_task tsk where
not exists (select 1 from tb_assignment assign where assign.id=tsk.current_assignment_id) or ((tsk.process_instance_id > 0) and
not exists (select 1 from tb_process_instance proc where proc.id=tsk.process_instance_id)) or ((tsk.action_instance_id > 0) and
not exists (select 1 from tb_action_instance act where act.id=tsk.action_instance_id)) or
not exists (select 1 from edcprincipalentity ent where ent.id=tsk.create_user_id) or
not exists (select 1 from tb_form_data form where tsk.form_data_id=form.id)

_____________________________________________

reference: (180999333/2360548)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 10.0/10 (2 votes cast)