How to trigger project B when project A is completed inside FinalBuilder scripts

Hi,

My scenario is :

"Project A is triggered to start by Perforce continuously while a new change is submitted.

Project B is only triggered when Project A is completed successfully. "

I understand that in FinalBuilder Server I can set Project A is Perforce triggered and Project B is dependent on Project A status, but I don't want to set this up in the FinalBuider Server.  I would like to make Project B triggered by Project A inside FinalBuilder scripts.   So far I am not sure how to do it.  Could I get some help please? I am really stuck at this point.

Thanks a lot.

Lizzie

 

Hi Lizzie,

 
You can do this by using the FinalBuilder Server web service and the Web Service actions within FinalBuilder. I've attached an example project which shows how to connect to the server, you can find the reference documentation for the service in the FinalBuilder Server help file.
 
URL: https://www.finalbuilder.com/fbserver/help/web_service_api.htm
 
Regards,
Paul.
001_FBSServiceExample.fbz6 (2.916 KB)

 Hi Lizzie,

I was just talking to Paul about this, and depending on exactly what you're after there may be an easier way than using the FinalBuilder Server web services.

If all you want to do is run one project after another, you can add an Include Project action as the last action in Project A, and set this the action to run Project B. Include Project is fairly flexible: it lets you run the whole project or particular action lists, and also lets Project A set variables for Project B. 

Hope that helps,

Ben

Thanks Paul & Ben. Sorry not to give feedback for so long as I just start to go back to the issue.

I think the way to handle my case is to use web service API. I used the action 'Web Service Iterator' in FB6 as described in Paul's example script. Looking at FinalBuilder Server help, https://www.finalbuilder.com/fbserve...ce_api.htm, I can see a list of methods of web service I would like to use but I couldn't find exact method names. For example, I would like to use 'Start Project with Variables' method, but I don't know what method name I should put inside 'Web Service Iterator'.

I thought I could get a list of methods after 'loading' a Service Description Url. After click 'load', it gives me 'The specified device description could not be loaded'. Is it an invalid Url? It should be as I could get a list of projects by using this Url.  The url I used is [build_machine]/Services/FinalBuilderServer.asmx.

I am a bit confused about this. Did I make some mistakes? Many thanks!

Regards

Lizzie


Hi Lizzie,

Unfortunately you are not able to use the ‘StartProjectWithVariables’ service method with the FinalBuilder web service actions as the actions do not allow array parameters, only simple value types. It should be fairly easy to create a custom .NET action that connects to the web service and starts the project with the required variable values. The help file contains a quick run down on how to connect to the service in C# or VB.NET.

Regards,
Paul.

Hi Paul,

Thanks for the reply. I had a look at customised examples in the documentation. It does not seem we could get that implemented quickly as we don’t use C# or VB.Net. Also we are not sure whether we can spend more time on learning it from scratch as we are in the critical stage of a project.

Could we request a new feature on supporting ‘StartProjectWithVariables’ service method in the FB Web service actions please? This is one of the method of Web service API and should be applicable inside ‘Web service action’. This method is exactly what we want as we want to trigger mutliple projects with paramerters inside FB scripts. I am sure this will benefit to other customers as well who are in the same situation. It will be really appreciated if this would become one of new features in FB.

BTW, the FB version I use is FB 6.3.0.2004.

Regards

Lizzie

Hi Lizzie,

It’s unlikely we’ll be able to make the changes to the web service actions to allow for array types to be used as method parameters, too many technical hurdles to overcome. If you don’t want to have a go at writing the custom action then an alternative solution is to use a ‘File Trigger’ in FinalBuilder Server to monitor a file that will be written out by the first project. This will also allow you to use the ‘Load Variables from INI’ action to load the variable values in from the file if you need to have the variable values change each time the project is run.

Regards,
Paul.