[Task does not exist or is not selected.] - VisualCron - Forum

Community forum

Gavin
  •  Gavin
  • Paid support Topic Starter
2018-07-26T13:39:28Z
HI,
We are using version 8.3.4.
We have VisualCron SQL tasks that run stored procedures. They pass VisualCron and user variables as parameter values. One of the values is the active task name, when we try to use {TASK(Active|Name)} it passes the value [Task does not exist or is not selected.] instead of the task name. This is strange because we have used the exact same task setup for the last 2 years through various versions of VisualCron but only have this issue in 8.3.4.

Do we simply need to upgrade to 8.3.5?
Support
2018-07-26T18:23:59Z
Originally Posted by: Gavin 

HI,
We are using version 8.3.4.
We have VisualCron SQL tasks that run stored procedures. They pass VisualCron and user variables as parameter values. One of the values is the active task name, when we try to use {TASK(Active|Name)} it passes the value [Task does not exist or is not selected.] instead of the task name. This is strange because we have used the exact same task setup for the last 2 years through various versions of VisualCron but only have this issue in 8.3.4.

Do we simply need to upgrade to 8.3.5?



Where do you use the Variable? It sounds like you should use the following if not in the same exact Task: {TASK(PrevTaskl|Name)}
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Gavin
  •  Gavin
  • Paid support Topic Starter
2018-08-08T15:41:33Z
The variable is used to pass the name of the task currently running in VisualCron to SQL. We use it to record process times in SQL. So for example if we want to record the timing of moving files from one location to another we use two SQL tasks, the first to create a start time of the process, the second SQL task to update the same record with a completion time once the activity completes.

For example -
1. First SQL task called 'Move Files' - This task creates a new record in SQL called 'Move Files'. It uses {TASK(Active|Name)} to pass the value 'Move Files' and will use it as the SQL record name. The current time is also passed and used as a processing start time. So we get the following SQL record - Move Files | Start Time = 11am | Completion Time = | Duration = |
2. A Move FIle task called 'Moving Files ABC' - This runs the move file activity. It takes 30 mins.
3. A second SQL task also called 'Move Files' - This task requires the same name as the first. Again it uses {TASK(Active|Name)} to pass the value 'Move Files' which is used to update the existing SQL record created in step 1 with a completion time. So we get - Move Files | Start Time = 11am | Completion Time = 11:30 | Duration = 30 mins |

If we use {TASK(PrevTaskl|Name)} we get the following result -

1. First SQL task called 'Move Files' - This task creates a new record in SQL. It uses {TASK(PrevTaskl|Name)} to pass the value 'Move Files' (as long as its the first task) and will use it as the SQL record name. The current time is also passed and used as a processing start time. So we get - Move Files | Start Time = 11am | Completion Time = | Duration = |
2. Move FIle task called 'Moving Files ABC' - Runs the move file activity. It takes 30 mins.
3. The second SQL task also called 'Move Files' - If we use {TASK(PrevTaskl|Name)} it will pass the value 'Moving Files ABC' instead of the current task running. So we get - Error - Record 'Moving Files ABC' does not exist.

We could adapt and rename our step 2 task from 'Moving Files ABC' to 'Move Files' but this would cause huge amount of rework and cause lots of confusion where we record groups of task activity. As i mentioned we have used this approach for ast 2 years. With no issues.
Gavin
  •  Gavin
  • Paid support Topic Starter
2018-08-14T12:06:55Z
Hi, Can anyone help with this issue?
Support
2018-08-15T11:03:47Z
Active refers to the current running Task. It can only be used within the Task. PrevTask should be used for next Task or next Notification. If you want to point to a specific Task you should use the TaskId or the TaskOrder. For example;

{TASK(2|Name)}
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Gavin
  •  Gavin
  • Paid support Topic Starter
2018-08-15T11:26:08Z
Thanks for your reply. You mention "Active refers to the current running Task. It can only be used within the Task."
That is exactly what we are doing, we are using it in the task currently running. As the VisualCron SQL task runs, it passes the name of it to the SQL stored procedure selected within the same task. Do you know why this would suddenly stop working in version 8.3.4?
thomas
2018-08-15T12:08:39Z
It works fine in 8.3.6. Haven't tested in 8.3.4
Scroll to Top