Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Workflow » Workflow implementation question
Re: Workflow implementation question [message #2788 is a reply to message #2778] Thu, 25 August 2011 13:14 Go to previous messageGo to previous message
grim is currently offline  grim
Messages: 11
Registered: July 2011
Location: Surrey, UK
Junior Member
I have been working on my simple workflow and I cannot explain some things. The idea of the workflow is that if one of the data fields is initially left empty, a workflow item is put on the queue to remind the user to complete the data. I hope someone can point me in the correct direction.

Firstly, I set up the workflow as follows:

Insert data task (Add1) -> Place Start

Place Start -> Transition T1 Check for missing data (Upd4)

Transition T1 Check for missing data (Upd4); guard (if field completed) -> Place End
Transition T1 Check for missing data (Upd4); guard (default) -> Place P1

Place P1 -> Transition T2 Add missing data (Upd1); guard(if field completed) -> Place End
Place P1 -> Transition T2 Add missing data (Upd1); guard(default) -> Place P1


This works fine, I run the first task and when it has finished it leaves an item on the workitems queue if the data field is empty. If the field is completed no entries are added to the workitems queue. Clicking on the workitems link launches the update, updating the data ends the workflow. If the user just clicks submit without updating the field, the item remains on the queue.

I have put some debugging statements into _cm_pre_updateRecord to see what is in fieldarray. I have a two dimensional array, the first being the whole record of which there is only one. The second array is associative and contains each of my data fields. As I expected, it looks exactly the same whether it comes from the Upd4 process or the Upd1 process.

In my guard statement for the Upd4 process I have to refer to my data field as:

$fieldarray[0]['cref']

I expected this based on the above debug info. However, when I use the same statement in the Upd1 guard statement, it doesn't find my data. To make it work, I have to refer to my data field as:

$fieldarray['cref']

I cannot get even close to working out why the two statements are different especially when the format of the fieldarray is the same when in the _cm_pre_updateRecord function.

I hope that someone can answer this question for me.

As always, thanks in advance.

Regards

Graham Jones
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using Pipe3 to model workflow
Next Topic: Workflow with optional transition?
Goto Forum:
  


Current Time: Fri Nov 22 10:00:56 EST 2024

Total time taken to generate the page: 0.00954 seconds