Jump to content
Sign in to follow this  
conanlam

[Resolved][SPEL] Insert task between group start and group end

Recommended Posts

Hi all,

I added some spell code for inserting workflow task between Group start task and Group end task, it added the task just fine, but those new tasks are in WAIT status instead of pending, even the group start task already completed.

Is there a way to insert the task with pending status? I tried to insert the wf task with PEND status which return an error, set_attr on status failed: AHD05724:Not a valid transition.

Best regards,

Conan

Edited by conanlam

Share this post


Link to post
Share on other sites

Hi,

you need to insert them as group task (using same named attribute), also if you insert 2 or more adjoined tasks with group flag they will start together if there group start presented or not.

Regards

Share this post


Link to post
Share on other sites

Hi all,

Thanks to Cdtj, I am able to resolve this issue.

    send_wait(0, top_object(), "call_attr", "wf", "add_workflow_task", 
                            gl,                                // group leader
                            chg_obj,                        // parent (change, issue) persid
                            (string)NULL,                            //status must be NULL to insert
                            (uuid)NULL,                        // asset
                            (uuid)wf_obj.creator,            // creator (any contact uuid)
                            (string)"APP",            // task type code
                            NULL,                    // wf template
                            (uuid)wf_obj.assignee,            // assignee (any contact uuid)
                            (duration)NULL,                    // est_duration
                            (int)NULL,                        // est_cost
                            (date)NULL,                        // est_completion_date
                            (int)0,                            // unknown int, not DB attr
                            (int)0,                            // another unknown int, not DB attr
                            (int)(wf_obj.sequence + 1)        // sequence
                        );

new_wf_obj = msg[0];

new_chgalg_obj = msg[1];

 

Conan

Edited by conanlam

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Announcements

    • Gregg

      Looking for the wiki content?

      12/20/2015

      Until I can transfer the wiki content over to the new Articles, you can find the old content here: http://www.greggsmith.net/wiki.
    • Gregg

      New site logo

      01/06/2016

      A special thanks to brianshs for creating a new site logo!
×