Run Action List / Include Project

Sometime I run into a situation where I need to execute several steps to achieve what I need.

For example: I want to discover the user name from a Perforce WorkSpace. To achieve this I currently execute the following steps / actions:

- Perforce Generic with Perforce Command "info" and additionally "Log To Variable" set

- Text Replace with Regular Expression Search String "(?ims)(.*^)(User name:.*$) and Regular Expression Replacement $2

- Text Replace with Regular Expression Search String (?ims)User Name: (.*$)(?-s)(.*)$ and Regular Expression Replacement $1

- Text Replace with Regular Expression Search String (?ms)$.* and Regular Expression Replacement $1

This might also be useful for other projects. Therefore I'd like to save these steps as a single project and then call it in need by means of the Include Project action. Therefore I need to provide the Perforce WorkSpace Name when calling the project. Unfortunately there is no way to return the calculated user name back to the caller.

This might be possible by one of the following ways:

- either I can specify a variable as 'by reference' and with this a value set to this variable by the called project (action list) is available for the calling project

- or a new 'result' variable is introduced providing means to return any value

Some implementation thoughts:

- in the variable editor might be a new checkbox 'share with calling action / project'

- variables marked this way are added to the list of variable in the 'Include Project' as well as 'Run Action List' action editors (Details / Options tab card)

- a variable of the calling project assigned to such a 'called' variable is shared with it (their values are always the same)

This approach should not affect existing project (thus is compatible with earlier versions) while providing the new functionality.

IMHO this might improve the worth of both actions (Run Action List / Include Project)

Best regards

Michael

Posted By Michael Jelich on 15 Aug 2011 09:52 AM

Sometime I run into a situation where I need to execute several steps to achieve what I need.

For example: I want to discover the user name from a Perforce WorkSpace. To achieve this I currently execute the following steps / actions:

- Perforce Generic with Perforce Command "info" and additionally "Log To Variable" set

- Text Replace with Regular Expression Search String "(?ims)(.*^)(User name:.*$) and Regular Expression Replacement $2

- Text Replace with Regular Expression Search String (?ims)User Name: (.*$)(?-s)(.*)$ and Regular Expression Replacement $1

- Text Replace with Regular Expression Search String (?ms)$.* and Regular Expression Replacement $1

This might also be useful for other projects. Therefore I'd like to save these steps as a single project and then call it in need by means of the Include Project action. Therefore I need to provide the Perforce WorkSpace Name when calling the project. Unfortunately there is no way to return the calculated user name back to the caller.

This might be possible by one of the following ways:

- either I can specify a variable as 'by reference' and with this a value set to this variable by the called project (action list) is available for the calling project

- or a new 'result' variable is introduced providing means to return any value

Some implementation thoughts:

- in the variable editor might be a new checkbox 'share with calling action / project'

- variables marked this way are added to the list of variable in the 'Include Project' as well as 'Run Action List' action editors (Details / Options tab card)

- a variable of the calling project assigned to such a 'called' variable is shared with it (their values are always the same)

This approach should not affect existing project (thus is compatible with earlier versions) while providing the new functionality.

IMHO this might improve the worth of both actions (Run Action List / Include Project)

Best regards

Michael


Yes, I'd like that, too... ;-)

returning variable values from running action lists and running included projects would be very, very appreciated

/Theo