Loading...
 
Skip to main content

Galaxia Workflow Engine


how to create a new instance?

hi,
i'm developing a workflow using galaxia api outside tiki.
Now it is the time to run an activty.

Image that you have a list of instances (as in tiki, under "User instances") and you have to run it.
I know the process id, the activity id and the instance id, of course.

questions:
1)can i start my php page calling $instace->getInstance($iid) ? instance id is unique?otherwise, how getInstance know what is the process and the activity for that instance?
2)after displaying some stuff, using $instance->set etc (doing something with my instance)
3)at the and, i have to call $instance->complete() for an interactive activity. The same, i have to use $instance->complete() without parameters?

the big one:
1)i have to code a start activity. of course, no instances are present, so i have not to call $instace->getInstance($iid). how to create a new instace for a particular process?

thank you for your help

Brazil

> the big one:
> 1)i have to code a start activity. of course, no instances are present, so i have not to call $instace->getInstance($iid). how to create a new instace for a particular process?

Simply call $instance->complete(). Galaxia will get process information from the activity Id, and will create an instance using the name you provided. Regards,

Georger


update:

using $instance->getInstance(iid) and then
$instance->complete(activity it, force=false, addworkitem=true)

the activity is completed but the instance is not show in the following activity (seems some error) 😑