export_opex & Export Workflow context?

34 views
Skip to first unread message

Roxana Maurer-Popistașu

unread,
May 20, 2026, 9:31:56 AMMay 20
to pyPreservica
Hi James,

Is there a way to pass a certain Export Workflow Context ID to the OPEX export? 

In order to prioritize exports over ingests, we got a new tagged Export Workflow going to a dedicated Job Queue server, but the OPEX Export doesn't seem to find the new context, even if it's the only one active. We simply get an error message: unable to find workflow context  for definition com.preservica.core.workflow.export. Any idea how we could bypass that?

Thanks,
Roxana

James Carr

unread,
May 20, 2026, 10:01:00 AMMay 20
to pyPreservica
Hi
One thing to try, make sure the workflow context parameters in the Preservica workflow definition exactly match the API parameters. 
It will look for a matching export workflow.

Screenshot 2026-05-20 145912.jpg

Roxana Maurer-Popistașu

unread,
May 20, 2026, 10:08:25 AMMay 20
to pyPreservica
Hi again,

Since the new workflow is a copy of the old one, it has the exact same parameters. But the workflow name and ID are different:
- old: name="Export (v6)" id="com.preservica.core.workflow.export"
- new: name="Export (v6) - priority tag" id="com.preservica.core.workflow.export-tagged"

Best,
Roxana

James Carr

unread,
May 20, 2026, 11:02:26 AMMay 20
to pyPreservica
I dont think you can.


Does it work if the "com.preservica.core.workflow.export" workflow is enabled?


This is a separate workflow API, which may work. I would need to investigate

Roxana Maurer-Popistașu

unread,
May 20, 2026, 11:32:21 AMMay 20
to pyPreservica
I see, that makes sense. I'll see if we can come up with another solution on our end.

Thank you again,
Roxana

James Carr

unread,
May 21, 2026, 6:26:47 AM (13 days ago) May 21
to pyPreservica
Hi
I managed to run an export workflow against the export workflow given by the definition id using the script below:

EntityRefs is the uuid of the asset or folder.  You could try this using your new definition id:   com.preservica.core.workflow.export-tagged




from pyPreservica import *

workflow = WorkflowAPI()

contexts: list[WorkflowContext] = workflow.get_workflow_contexts('com.preservica.core.workflow.export')
for context in contexts:
    params = {'EntityRefs': '296ef8cb-5f5e-42e9-9cc0-daff460bb35e' }
    pid = workflow.start_workflow_instance(context, **params)
    print(pid)
Reply all
Reply to author
Forward
0 new messages