Loading...
 
 Error
  • Contact the site administrator. The index needs rebuilding.
Galaxia Workflow Engine

Galaxia Workflow Engine


Re: Re: More patches for Galaxia

Brazil

> Hi georger,
> Thanks for your work! ;)
>
> but i have a little problem applaying patch "tikiwiki now no needs fopen to execute no-interactive activities".
> I'm developing outside tikiwiki, so i have a galaxia.api.inc.php ( included) structured like this:
>
> 1)constraints (GALAXIA LIBRARY, ETC..)
> 2)libraries (gui, instance, processmonitor, etc)
> 3)function "galaxia_execute_activity" (replaced with yours)
>
> i get this error:
>
> "Fatal error: Using $this when not in object context "
>
> i suppose on first line...
>
> // Now execute the code for the activity but we are in a method!
> $activityname = $this->getOne("select `normalized_name` from `" . GALAXIA_TABLE_PREFIX .
>
> what do you think the problem is?
> Thanks
>
> Gremo

Hmm,
I think it's because galaxia_execute_activity() does not have the same includes as tiki-g-run_activity.php. I modified the function to have these includes, and tested it. All worked fine. I committed the change to CVS and you can get it from there. If you can't get it from CVS, here goes the modified function:

Image
Copy to clipboard
function galaxia_execute_activity($activityId = 0, $iid = 0, $auto = 1) { // Use the same includes as tiki-g-run_activity.php in order to obtain context info include ('tiki-setup.php'); include ('lib/Galaxia/API.php'); include_once ("lib/webmail/htmlMimeMail.php"); $__activity_completed = false; // Determine the activity using the activityId request parameter and get the activity information // load then the compiled version of the activity if (!isset($_REQUEST['activityId'])) { $smarty->assign('msg', tra("No activity indicated")); $smarty->display("error.tpl"); die; } $activity = $baseActivity->getActivity($_REQUEST['activityId']); $process->getProcess($activity->getProcessId()); if (!isset($_REQUEST['__post'])) { $shared = 'lib/Galaxia/processes/' . $process->getNormalizedName(). '/code/shared.php'; $source = 'lib/Galaxia/processes/' . $process->getNormalizedName(). '/compiled/' . $activity->getNormalizedName(). '.php'; // Existing variables here: // $process, $activity, $instance (if not standalone) // Include the shared code include_once ($shared); // Now do whatever you have to do in the activity include_once ($source); } }



Regards,

Georger

There are no comments at this time.