Home > Forum > General > Any option to complete tasks?

Any option to complete tasks?
0

MVP

Hi everyone,

I'm currently facing the following situation:
A workflow has a 'wait for sub-workflows' step. A new request came in, to assign a task during this step, so that the workflow still get's listed in the tasks overview. So far so good, I used the 'Create a task' action to manually add a task. Unfortunately, this task isn't completed when the workflow moves to the next step. As a result there are two task in the next step. The one which is created by the path transition and the one created by the task. I assumed that choosing "Set other tasks as finished" on the path would finish it, but this is not the case.

That's the situation and I'm wondering whether there's another option to finish the manual created task instead of using one of these approaches:

a) Changing the step from 'wait for sub-workflow' to an intermediate one, adding actions to the sub workflow to move the workflow forward once all are finished. This get's a little tricky, because there are two types of workflows which can be created and finished at any time but must be completed at a defined step. Workflow one can be created during step 1-4 but must all must be completed in step 4, if any exist. The second one can be created during step 1-6 and all must be completed in step 6. If the parent workflow is not in step 4 or 6 nothing should happen to it.
b) I thought about creating a Custom Action using the SDK but I didn't see an option for this.

Best regards,
Daniel

MVP

Hi Daniel, I don`t know how to finish these tasks, but about option a ;)

If you are using 'wait for sub-workflows' step, then you have to set element as completed positive/negative with action, or element goes to finall step, right?
So even if you have multiple workflows/finall steps, I found out recently that WFD_StatusId column determines whether element is completed or not:
1 - In progress / 2 - positive / 3 - negative.

Also, you wrote that changing to system/intermediate step requires "adding actions to the sub workflow to move the workflow forward once all are finished.". That`s right, but i like the approach that parent element is always moving "forward", to flow control, despite other subworflows. Then in flow control rule, you can decide if it goes to next step or not. Using WFD StatusId, query should be simple.
I hope I didn`t get your case wrong, and helped a little :)

MVP
In reply to: Sebastian Gębuś

Hi Daniel, I don`t know how to finish these tasks, but about option a ;)

If you are using 'wait for sub-workflows' step, then you have to set element as completed positive/negative with action, or element goes to finall step, right?
So even if you have multiple workflows/finall steps, I found out recently that WFD_StatusId column determines whether element is completed or not:
1 - In progress / 2 - positive / 3 - negative.

Also, you wrote that changing to system/intermediate step requires "adding actions to the sub workflow to move the workflow forward once all are finished.". That`s right, but i like the approach that parent element is always moving "forward", to flow control, despite other subworflows. Then in flow control rule, you can decide if it goes to next step or not. Using WFD StatusId, query should be simple.
I hope I didn`t get your case wrong, and helped a little :)

Hi Sebastian,

thanks for your answer but it doesn't quite match my question/issue so I didn't a good job on explaining:
You can think of my parent workflow as a project with milestones. The task to achieve the milestones can be created at every point in time but those of a specific type must be completed at their respective milestones. Of course they can be completed earlier. I would like to handle this within the parent workflow which seems not to be possible because of the task which is assigned during the wait for sub-workflow step.

Normal/intermediate step:
On path transition the tasks are closed as completed/cancelled based on the parallel execution configuration

Wait for sub-workflow step:
This logic is not triggered, as far as I can tell. This is understandable since you simply don't have tasks assigned in this step. :)

So my task from this step remains open and will be closed once a path transition occurres in the following intermediate step.

That's the reason why I'm thinking about changing the type of the step.

Regarding the subworkflow settings, thanks to Kamil I know how to use these, https://community.webcon.com/forum/thread/120

I'm also using the column and until some weeks before I wasn't aware, that there is a variable mapped to the status value under the system node.

Best regards,
Daniel

MVP
In reply to: Daniel Krüger (Cosmo Consult)

Hi Sebastian,

thanks for your answer but it doesn't quite match my question/issue so I didn't a good job on explaining:
You can think of my parent workflow as a project with milestones. The task to achieve the milestones can be created at every point in time but those of a specific type must be completed at their respective milestones. Of course they can be completed earlier. I would like to handle this within the parent workflow which seems not to be possible because of the task which is assigned during the wait for sub-workflow step.

Normal/intermediate step:
On path transition the tasks are closed as completed/cancelled based on the parallel execution configuration

Wait for sub-workflow step:
This logic is not triggered, as far as I can tell. This is understandable since you simply don't have tasks assigned in this step. :)

So my task from this step remains open and will be closed once a path transition occurres in the following intermediate step.

That's the reason why I'm thinking about changing the type of the step.

Regarding the subworkflow settings, thanks to Kamil I know how to use these, https://community.webcon.com/forum/thread/120

I'm also using the column and until some weeks before I wasn't aware, that there is a variable mapped to the status value under the system node.

Best regards,
Daniel

Hi Daniel, thanks for the clarification, got it :)
I wanted to add a few words about option with changing the type of step, but i see that you know excatly how to do it, so nevermind :)

I noticed that the task is not completed in this case, but I cannot help you with that.
I also didnt find a simple way to finish such a task, maybe it is worth proposing it in user voice :)
In theory, it should be enough to update the WFT_IsFinished flag, but we should never do manual updates on the table, so that's out of the question.

PS. I found that mapped variable, I dont know how I didnt notice it yet, thanks :)

MVP
In reply to: Sebastian Gębuś

Hi Daniel, thanks for the clarification, got it :)
I wanted to add a few words about option with changing the type of step, but i see that you know excatly how to do it, so nevermind :)

I noticed that the task is not completed in this case, but I cannot help you with that.
I also didnt find a simple way to finish such a task, maybe it is worth proposing it in user voice :)
In theory, it should be enough to update the WFT_IsFinished flag, but we should never do manual updates on the table, so that's out of the question.

PS. I found that mapped variable, I dont know how I didnt notice it yet, thanks :)

Hi Sebastian,

dann I didn't notice your reply or it wasn't there when I added the project/milestone explanation above. :)

Even if you don't have an idea how to achieve it's good to get a confirmation that I didn't miss an option. I also agree with the you that data modifications shouldn't be done. :)

Regarding the variables. I also did miss them and created global constants instead. The good thing is, that I could easily change the locations afterwards. :)


Before I implement the change I will try to argue against the 'task' in this step and propose using this instead. This would be better anyway. I hope to publish the blog post along with the application today. My 17th month old didn't sleep well yesterday or I would have finished it yesterday.

https://community.webcon.com/forum/thread/600?messageid=600

Best regards,
Daniel

MVP
In reply to: Bartłomiej Spyrka (WEBCON)

Hello Daniel,

I just want to bring some infomation from my perspective:

1) case when task is not being closed when generated at wait for subworkflows step is a bug, I've reproduced that and it would be fixed in BPS as a product solution for that

2) to bring 'quick fix' - I would pick scenario with moving / creating action involved at subworkflow level (Move workflow SQL) + changing parent step to intermediate (or system step) both will display tasks - but here you need to remember to hide paths (so the users assigned shouldnot use them manually)

Hi Bartłomiej,

thanks for your response. :)

Reading your post I just got the idea for an easy quick fix:
The sub workflow step will lead to an intermediate step. This has a timeout which executes immediately and moves the workflow to the original step. So the task from the wait for sub-workflow step will be closed in the new step. :)

Once this loooooow priority 'bug' is fixed, I only need to delete my step.

Thanks everyone. :)

Edit:
Works just fine and testing it took longer than the implementation. I just love working with WEBCON BPS. :)

Best regards,
Daniel