Create custom approval

Create custom approval

POST https://baseurl/ServiceCatalog/Api.asmx

Create a new custom approval from within the workflow. This action is useful to use in case you used an Action to start a workflow and want the service to get blocked for pending approvals.

Query Parameters

NameTypeDescription

SecurityCheck

string

External provider security check

ProviderName

string

External provider Id

ProcessInstanceGuid

string

ProcessInstanceGuid of the ticket processing the approval

ProcessInstanceId

string

Ticket Id processing the approval

Comments

string

Text to show in approval step

ActorPerson

string

Name of the approver

CanBeCancelled

boolean

Approval can be cancelled or not from within the service details page

ServiceGuid

string

Guid of the service

TypeName

string

Type of approval

XSL In

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0' xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://smt-x.com/Services/">
	<xsl:template match='/SSPAdapterCall'>
		<soap:Envelope>
			<soap:Header />
			<soap:Body>
				<ser:AddCustomServicePublishRequest>
					<ser:ServiceGuid><xsl:value-of select="Field[@Name='ServiceGuid']" /></ser:ServiceGuid>
					<ser:TypeName><xsl:value-of select="Field[@Name='TypeName']" /></ser:TypeName>
					<ser:CanBeCancelled><xsl:value-of select="Field[@Name='CanBeCancelled']" /></ser:CanBeCancelled>
					<ser:ActorPerson><xsl:value-of select="Field[@Name='ActorPerson']" /></ser:ActorPerson>
					<ser:Comments><xsl:value-of select="Field[@Name='Comments']" /></ser:Comments>
					<xsl:if test="Field[@Name='ProcessInstanceId'] != ''"><ser:ProcessInstanceId><xsl:value-of select="Field[@Name='ProcessInstanceId']" /></ser:ProcessInstanceId></xsl:if>
					<xsl:if test="Field[@Name='ProcessInstanceGuid'] != ''"><ser:ProcessInstanceGuid><xsl:value-of select="Field[@Name='ProcessInstanceGuid']" /></ser:ProcessInstanceGuid></xsl:if>
					<ser:ProviderName><xsl:value-of select="Field[@Name='ProviderName']" /></ser:ProviderName>
					<ser:SecurityCheck><xsl:value-of select="Field[@Name='SecurityCheck']" /></ser:SecurityCheck>
				</ser:AddCustomServicePublishRequest>
			</soap:Body>
		</soap:Envelope>
	</xsl:template>
</xsl:stylesheet>

XSL Out

<?xml version='1.0' ?>
<xsl:stylesheet 
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' 
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"  
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ssp="http://smt-x.com/Services/"
version='1.0'>
	<xsl:template match="/">
		<SSPAdapterResult>
			<xsl:apply-templates select="/soap:Envelope/soap:Body/ssp:AddCustomServicePublishRequestResponse/ssp:AddCustomServicePublishRequestResult"/>
			<xsl:apply-templates select="/soap:Envelope/soap:Body/soap:Fault"/>
		</SSPAdapterResult>
	</xsl:template>
	<xsl:template match="/soap:Envelope/soap:Body/ssp:AddCustomServicePublishRequestResponse/ssp:AddCustomServicePublishRequestResult">
		<Value><xsl:value-of select='.' /></Value>
	</xsl:template>
	<xsl:template match="/soap:Envelope/soap:Body/soap:Fault">
		<Error>code:<xsl:value-of select='soap:faultcode' /><xsl:value-of select='soap:Code/soap:Value' /> - string:<xsl:value-of select='soap:faultstring' /><xsl:value-of select='soap:Reason/soap:Text' /></Error>
	</xsl:template>
</xsl:stylesheet>

Last updated