cancel
Showing results for 
Search instead for 
Did you mean: 

Document getting locked but not entering workflow

Former Member
0 Kudos

Hello Everybody,

I am working on Sourcing 5.1 and have the common three environment (DEV, QA & PROD) setup.

I created a workflow definition that works perfectly in DEV and PROD but not in QA.

Here is the problem: The document transitions to the approval phase. I have confirmed this by the logging made by post phase change script. As expected, the system locks the document. But the document doesn't enter workflow. No workitems are generated and neither do the documents show up in the Current Workflow Processes report for this workflow definition.

What I have already tried:

  • I have checked the XPDL code and the associated scripts that the workflow might refer during execution and they are all same in the three environments.
  • I have tried restarting the Workflow daemon by deleting it but still no use.

Additional Info:

  • There are no alerts being generated by the Workflow engine (under Background Task Status)
  • The Pending Daemon Alerts report doesn't contain any entry for Workflow event type.
  • The Pending Daemon Events has around 15 entries, all for EVENT_WORKFLOW_ENGINE. A couple of these entries have a value in the 'Next Retry Time' column. There is no option to delete these entries

Since the workflow works for two environments I don't think the workflow definition should have any errors in it.

Any help in this matter is appreciated.

Thanks

Devesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Devesh,

I am facing the same issue - could you let me know how you managed to get around this?

Regards,

Subhasini

0 Kudos

Hello,

If the Workflow daemon is not able to consume a phase change event, my guess would be it ran into some kind of significant error.  Can you check the corresponding Sourcing log files?  Hopefully we are logging something that can help troubleshoot the root cause.

Thanks

Former Member
0 Kudos

Hello Robert,

Thanks for the reply.

I checked the log files but it is not logging anything important for workflow engine.

Here are all the lines that come up when I search for 'Workflow' in the log file

  • 2013-05-15 09:52:13.885DEBUGlocal4com.frictionless.common.db.DbCtxcreateConnection()Daemon-029: EVENT_WORKFLOW_ENGINE (-2147483548)



    Connecting to oracle.jdbc.driver.OracleDriver with jdbc:oracle:thin:@XXXXXX
    2013-05-15 09:52:13.941INFOlocal4CurrentDatabaseisAvailableDaemon-029: EVENT_WORKFLOW_ENGINE (-2147483548)system-13726424database_monitor

    current database available at: Wed May 15 09:52:13 MDT

    2013

  • 2013-05-15 09:56:51.302DEBUGlocal4DbConnectionPoolcheckoutDaemon-029: EVENT_WORKFLOW_ENGINE (-2147483548)



    ***WAITING(1)
    2013-05-15 09:56:51.306DEBUGlocal4DbConnectionPoolcheckoutDaemon-029: EVENT_WORKFLOW_ENGINE (-2147483548)



    ***PROCEEDING(0)

  • 2013-05-15 09:56:51.302DEBUGlocal4DbConnectionPoolcheckoutDaemon-029: EVENT_WORKFLOW_ENGINE (-2147483548)



    ***WAITING(1)
    2013-05-15 09:56:51.306DEBUGlocal4DbConnectionPoolcheckoutDaemon-029: EVENT_WORKFLOW_ENGINE (-2147483548)



    ***PROCEEDING(0)

  • 2013-05-15 09:57:08.471INFOlocal4

    RequestHandler.RqThread: change_config_phase(J2EE2730300)ID1259471750DB23be5049661751814085855175456d28ed3e161fEndx160722

    flipping flag, either system or workflow being used

Are we looking for anything specific? It shall help me in narrow down my search.

Thanks

Devesh

Message was edited by: Devesh Sati Prasad

0 Kudos

Hello Devesh,

I would expect to see an actual ERROR or two.  That is typically what I have found in this scenario.  Past root causes have included things like script errors, both from the XPDL itself as well as document lifecycle event scripts I believe.  I'll have to poke around in my email archives and see if I can find anything else that might be helpful.  However, I'm on vacation for the next two weeks so it may be a while before I can post anything else.  Hopefully someone else can jump in with some suggestions.

Thanks

Former Member
0 Kudos

Hi Robert,

I think I forgot to mention in my first post that there are no errors generated when I send the document to workflow. The XPDL code will not generate any errors because it is not being executed at all. I have confirmed this from the logs. And this is also precisely what I want to know - Why is the workflow not being triggered even when the document is getting locked. There are no errors from any of the Document Lifecycle scripts as well.

Thanks

Devesh

0 Kudos

Hi Devesh,

You mention above that your XPDL code (scripts) are not being executed at all and that you have confirmed this in your log files.  I'm curious about this.  Can you elaborate?  This would seem very strange to me because the workflow code doesn't lock the associated document until after we have evaluated the XPDL script.  Do you have some kind of logging in your preScript?

Former Member
0 Kudos

Hi Robert,

The first few statements of my preScript code for workflows contain just logging information. So as soon as a document enters the workflow, it first writes to the log file that it has entered workflow.

The problem is that this logging is no where to be seen in the logs. And yes, it is strange that the document is getting locked but there is no logging!!

Thanks

Devesh

0 Kudos

Sorry Devesh, I misspoke.  During a phase change, the document is in fact locked as soon as it is determined that the target phase is a workflow phase.  Subsequently, the preScript on the Activity is evaluated.

Just to be clear, after the phase change the document remains locked and you can see at least one Approver collaborator in the collaborators collection?

Rob

Former Member
0 Kudos

Hi Robert,

After the phase change the document remains locked but the approvers are not added to the Collaborators collection.

As far as I know, the preScript adds the approvers to a document. Since the preScript is not being executed in our case, there are no approvers added to the Collaborators collection.

Thanks

Devesh

0 Kudos

One thing that may be interesting to try is create a document, add an Approver collaborator directly to the collaborators collection, then trigger the phase change.  I'd be curious to see if a workitem is successfully created for this user and if the workflow process would show up in the Current Workflow Process report.

Are we 100% sure that the XPDL file in QA is the exact same one as DEV and PROD?

Thanks

Former Member
0 Kudos

I tried to replicate what you said, Rob. Neither the workitem was generated nor did the document show up in the Current Workflow Processes report.

And yes, we are dead sure that XPDL files are same in all the three environments. In fact, to be sure I uploaded the workflow definition that I took from PROD.

Thanks

Devesh

Message was edited by: Devesh Sati Prasad