MSBuild Tasks

Available from WorkWithPlus for Web 15 Upgrade #2.2

 

WorkWithPlus allows you to run the following tasks using MSBuild:

WWP_ApplyAllInstances

Applies all the instances of the opened Knowledge Base.

WWP_UpdateAllInstances

Updates all the instances of the opened Knowledge Base. This process applies to each instance after updating it, so it is NOT necessary to make 'Apply all instances' after 'Update all instances'.

WWP_MarkAllInstancesAsUpdated

Marks all instances as updated of the opened Knowledge Base.

WWP_ImpactMetadata

Runs the process 'Impact metadata for Web and Native Mobile'. It is necessary to execute the RUN task of the object 'WWPBaseObjects.WWP_ImpactMetadata' after it to update the database.

WWP_ApplyTemplate

Applies a template to a Panel, Web Panel, or Transaction. The parameters needed for this task are:

  • TransactionName: Name of the transaction to apply the template. This parameter is needed in two scenarios: a) When you want to apply a template to a transaction. b) When you want to apply a template to a WebPanel based on a Transaction. If you want to apply a template to a WebPanel or a Procedure and it won't be based on a transaction, this parameter shouldn't be assigned. 
  • WebPanelName: Name of the Web Panel to apply the template. This parameter is needed only when you want to apply a template to a certain Web Panel. If the Web Panel doesn't exist, a new Web Panel with this name will be created.
  • ProcedureName: Name of the Procedure to apply the template. This parameter is needed only when you want to apply a template to a certain Procedure (for creating a Report).
  • TemplateName: Name of the template to apply to the object.
  • IsSplitWithTabs: True when the template to be applied is a split-screen template.
  • Platform: Platform of the generated object. The options are Web, NativeMobile, or Angular. This parameter is only required when the KB has WorkWithPlus initialized on both Angular and NativeMobile platforms simultaneously. Otherwise, you can leave it empty.

WWP_CreateFromCurrentLayout

Creates an instance from the current layout of the object. It will create the instance based on the template 'Empty'. The parameters needed for this task are:

  • TransactionName: Name of the Transaction from which the instance will be created. Only one of the three parameters (TransactionName, WebPanelName, or SDPanelName) will have a value.
  • WebPanelName
  • SDPanelName
  • Platform: Platform of the generated object. The options are Web, NativeMobile, or Angular. This parameter is only required when the KB has WorkWithPlus initialized on both Angular and NativeMobile platforms simultaneously. Otherwise, you can leave it empty.

 

In the following project example, a KB is opened, and you can visualize how to run the tasks mentioned above (you can copy the code). 

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <PropertyGroup>
    <GXPath />
    <KBPath />
  </PropertyGroup>

  <Import Project="$(GXPath)\Genexus.Tasks.targets" />
  <Import Project="$(GXPath)\Packages\Patterns\WorkWithPlus\DVelop.WorkWithPlus.Tasks.targets" />

  <Target Name="TestMSBuild">    
    <OpenKnowledgeBase Directory="$(KBPath)" />
    
    <WWP_ApplyAllInstances />

    <WWP_UpdateAllInstances />

    <WWP_MarkAllInstancesAsUpdated />

    <WWP_ImpactMetadata />
    <Run Build="true" BuildCalled="true" ForceRebuild="false" ObjectName="WWPBaseObjects.WWP_ImpactMetadata" />
    
  </Target>

</Project>

As you can visualize in the project mentioned above, in order to run these MSTasks you need to import the WorkWithPlus targets, which you can download from the following link. This file has to be located in the WorkWithPlus folder within the installation of GeneXus

MSBuildTargetsFile