<?xml version="1.0" encoding="UTF-8"?>
<ns0:WorkFlow xmlns:ns1="http://flexagon.com/flexdeploy/workflow/common" xmlns:ns0="http://flexagon.com/flexdeploy/workflow">
   <ns1:Name>DeployAPI</ns1:Name>
   <ns1:Description></ns1:Description>
   <ns0:Variables/>
   <ns0:Steps>
      <ns0:Step>
         <ns1:Name>importAPI</ns1:Name>
         <ns1:StepId>1</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonOracleAPIPlatformPlugin</ns0:PluginName>
            <ns0:PluginOperation>importAPI</ns0:PluginOperation>
            <ns0:consumesArtifacts>true</ns0:consumesArtifacts>
            <ns0:producesArtifacts>false</ns0:producesArtifacts>
            <ns0:PluginInputs>
               <ns0:PluginInput>
                  <ns0:Name>FDOAP_INP_SMART_IMPORT</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>Boolean</ns1:Type>
                  <ns0:Text>true</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDOAP_INP_API_GRANTS</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>ManageAPIGrant</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDOAP_INP_GROUPS</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>OCI_Administrators</ns0:Text>
               </ns0:PluginInput>
            </ns0:PluginInputs>
            <ns0:UserInputs/>
            <ns0:PluginOutputs>
               <ns0:OutputValue>
                  <ns0:NameInCallee>FDOAP_OUT_API_ITERATION</ns0:NameInCallee>
                  <ns0:NameInCaller></ns0:NameInCaller>
               </ns0:OutputValue>
               <ns0:OutputValue>
                  <ns0:NameInCallee>FDOAP_OUT_API_ID</ns0:NameInCallee>
                  <ns0:NameInCaller></ns0:NameInCaller>
               </ns0:OutputValue>
            </ns0:PluginOutputs>
            <ns0:UserOutputs/>
         </ns0:InvokePlugin>
      </ns0:Step>
      <ns0:Step>
         <ns1:Name>deployAPI</ns1:Name>
         <ns1:StepId>2</ns1:StepId>
         <ns0:InvokePlugin>
            <ns0:PluginName>FlexagonOracleAPIPlatformPlugin</ns0:PluginName>
            <ns0:PluginOperation>deployAPI</ns0:PluginOperation>
            <ns0:consumesArtifacts>true</ns0:consumesArtifacts>
            <ns0:producesArtifacts>false</ns0:producesArtifacts>
            <ns0:PluginInputs>
               <ns0:PluginInput>
                  <ns0:Name>FDOAP_INP_DEPLOY_ACTION</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>DEPLOY</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDOAP_INP_API_STATE</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text>ACTIVE</ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDOAP_INP_API_STATUS</ns0:Name>
                  <ns0:ValueType>Expression</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Value>
                     <ns0:Expression>if (FD_ENVIRONMENT_CODE.equals('TEST')){
  'ALPHA'
}
else if (FD_ENVIRONMENT_CODE.equals('PROD')){
  'RELEASED'
}
else 'BETA'</ns0:Expression>
                  </ns0:Value>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDOAP_INP_DESCRIPTION</ns0:Name>
                  <ns0:ValueType>Expression</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Value>
                     <ns0:Expression>"Deployed via FlexDeploy.  Version: " +  FD_PROJECT_VERSION</ns0:Expression>
                  </ns0:Value>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDOAP_INP_API_ITERATION</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>String</ns1:Type>
                  <ns0:Text></ns0:Text>
               </ns0:PluginInput>
               <ns0:PluginInput>
                  <ns0:Name>FDOAP_INP_WAIT_DURATION</ns0:Name>
                  <ns0:ValueType>Text</ns0:ValueType>
                  <ns0:Encrypted>false</ns0:Encrypted>
                  <ns1:Type>Integer</ns1:Type>
                  <ns0:Text>120000</ns0:Text>
               </ns0:PluginInput>
            </ns0:PluginInputs>
            <ns0:UserInputs/>
            <ns0:PluginOutputs/>
            <ns0:UserOutputs/>
         </ns0:InvokePlugin>
      </ns0:Step>
   </ns0:Steps>
</ns0:WorkFlow>