Multirow task execution

  • 4 February 2019
  • 36 replies
  • 2290 views
Multirow task execution

Show first post

36 replies

Userlevel 7
Badge +11

Hi Ricky,

I hope for us that by doing so we only need to remove the code above and can use the @records table.

That is indeed how it will need to be modified. 

 

And how to deal with unit tests on multi rows?

We will automatically convert these input strings to the required data structure.

Userlevel 4
Badge +14

I have a multi row task that starts a process flow. Now I want to show progress (tsf_send_progress), but this progress is not shown in the GUI. When I look in the debug tab I can see the messages are sent. What could be the reason?   

Userlevel 5
Badge +15

@Ricky This is on our backlog, but we have not yet planned a date for this.

It is, however, trivial to locate and rewrite the select (and delete) from the XML to use a table valued parameter. And from a functional point of view, it doesn't make any difference.

Hi @Jasper , can you tell a bit more about the table-valued parameters in general what the plans are? And in what period of time? As I can't find it in the ‘ideas’ backlog.

I assume the multi row solution will be replaced by that, but I think I have another case for which table valued parameters could be useful. But I'm not sure it's part of the same, or something new.

It could be useful when you could design them as ‘Domain’, so it can be used in tasks, subroutines and process flows. We currently use a lot of XML passing data in process flows, but handling XML is pretty heavy for SQL Server. It also could decrease our code base as it's no longer necessary to apply transformations from a table variable, to XML, and back from XML to a table variable.

 

Hi @Jasper & @Anne Buit, we recently added the xml formatting in our task to make multiselect work. Before, we made use of a table which we filled and emptied via the use of a process flow. This is not needed anymore thanks to your xml tip! 

However, we did have default & layout logic which were based on the above stated table. Since this table is not needed anymore, I wanted to base the logic on the xml field regarding defaults and layouts. 

You clearly stated the following:

“The parameter is only filled when the task is executed. The XML is therefore not visible in the popup or available in the default and layout logic.”

Is there anyway to work around this? How can we track the selected rows in the default/layout using this method?

Userlevel 7
Badge +11

Hi @Marijn van de Bree,

Would this suggestion from Robbert and Mark be an option?
https://community.thinkwisesoftware.com/questions-conversations-78/multirow-task-execution-159?postid=7862#post7862

Userlevel 7
Badge +11

Of course, sorry about that!

Userlevel 1
Badge +2

Hi @Jasper ,

The multirow variable isn’t filled for me.

I followed the steps you described.

When I try to view the content of the variable with tsf_send_message it’s just empty for me.

Also the task still seems to be executed multiple times.

 

Can you help me with this?

 

Regards,

Peter

Userlevel 7
Badge +11

Hi pvleeuwen, 

Can you please file a ticket in TCP for this? Thanks.

Userlevel 2
Badge +12

@Jasper 

I am using multirow task execution in a task where parameters are type date and time. The XML is filled with what looks like UNIX date format and the trimeformat is even more excotic…

        <maut_date>2022-11-03T00:00:00+01:00</maut_date>
        <maut_time>PT18H2M</maut_time>

The above values in the XML  are selected in the GUI, but for starters, the date in XML will become 2022-11-02 using the following SQL statement

 

            select 
row.value('./maut_period [1]' , 'reference_number') as maut_period
, row.value('./maut_booking_number [1]' , 'reference') as maut_booking_number
, row.value('./maut_serial_number [1]' , 'sequence') as maut_serial_number
, row.value('./maut_vehicle_registration_no [1]' , 'vehicle_registration_no') as maut_vehicle_registration_no
, row.value('./maut_date [1]' , 'datetime') as maut_date
-- , row.value('./maut_time [1]' , 'time') as maut_time
, row.value('./maut_description [1]' , 'reference') as maut_description
from @input_set.nodes('/rows/row') as t1(row)

How do I get the date and time back to what is selected in the GUI when selecting multiple rows? The date and time are keys in the table that needs to be updated…

 

 

Userlevel 5
Badge +20

Very unfortunate that the multiselect parameter remains empty in default procedures. Is there a specific reason for that? And can we expect this to become available in the future?

I understand it can be complex, but just having the initial values of table parameters available in the multiselect parameter of the default procedure would help a lot to make multiselect tasks even more powerful.

 

 

Userlevel 5

Very unfortunate that the multiselect parameter remains empty in default procedures. Is there a specific reason for that? And can we expect this to become available in the future?

I understand it can be complex, but just having the initial values of table parameters available in the multiselect parameter of the default procedure would help a lot to make multiselect tasks even more powerful.

 

 

Hi Harm,

I would imagine that it remains empty because the default is executed per row and not per set.

What is the usecase in which you need the xml parameter in the default?

Reply