Follow-On Topics

Related Topics

# About the Workflow Web Service

The Workflow Web Service is a .NET-enabled software application that enables developers to integrate functionality for users to add, edit, submit, re-assign, and delete Workflow Jobs into their own web sites, applications, or web services.

As the product is .NET enabled and access to the web service uses standard internet protocols, it is vendor, platform and language independent enabling multiple methods of connection. The web service also supports WSDL and DISCO.

## Architecture The Workflow Web Service uses a single asmx file with a C# code-behind page which calls onto the WorkflowManagement object in the `iwobjects.dll`. The session object is used to keep track of whether the user is logged in or not.
|  | WebService:System.Web.Services.WebService — `webservice.asmx.cs`
|  | Quadrant Software B.V..King Task Centre.IwObjects.WorkflowManagement — `iwobjects.dll`
|  | Quadrant Software B.V..King Task Centre.IwObjects.WorkflowStep — `iwobjects.dll`
|  | Quadrant Software B.V..King Task Centre.IwObjects.User — `iwobjects.dll`
|  | Quadrant Software B.V..Utils.Trace — `iwlogging.dll`
Examples of how to incorporate SOAP or HTTP using a number of different programming languages is provided in the Programming Language Specifics below. Each method provides basic security for encrypting account identifiers and passwords, but to achieve total security a secure sockets layer (SSL) should be employed. |

## Programming Language Specifics

NOTE:

Sample projects demonstrating the key issues described here are available in the Workflow Web Service Samples folder under the King Task Centre installation directory.

Encryption

To prevent the Username and Password from being in readable form, they can be encrypted. To send in an encrypted username or password, simply take each character value for strings representing both and add one. This is sufficient to render known words as garbled text. If the encrypted flag is set on a method call, the reverse of this is done inside the server software.

An example function might be:

    private void EncryptCredentials(string username, string password, out string encusername, out string encpassword)

    {

    // First encrypt the username

    char[] procArr = username.ToCharArray();

    char[] output = new char[procArr.Length];

    for(int i = 0; i < username.Length; i++)

    output[i]= (char)(procArr[i]+1);

    encusername = new string(output);

    // Encrypt the password

    StringBuilder sb2 = new StringBuilder();

    procArr = password.ToCharArray();

    output = new char[procArr.Length];

    for(int i = 0; i < password.Length; i++)

    output[i]= (char)(procArr[i]+1);

    encPassword = new string(output);

    }

.NET

Microsoft’s primary development environment for .NET is Visual Studio 2003. This dramatically simplifies accessing Web Services. Alternatively the .NET SDK may be used, but that is outside of the scope of this guide.

There are many languages available for the .NET platform but in this instance we shall consider the more popular languages of C#, VB and C++.

Web Services such as the Workflow Web Service support an interrogation system for detailing the available interfaces and methods.

Visual Studio automatically does this for you and creates an object exposing all of the methods of the service as described in the Function Reference section of this guide. All the user then has to do is to instantiate the object and make calls onto it.

To illustrate this procedure:

|  | Make a blank Windows forms project in any of the languages mentioned above.

|  | Next navigate to the solution explorer, right click on references and select Add Web Reference.

|  | At the prompt, enter the address of the Workflow Web Service as follows: `http://www.mysite.com/WorkflowWebService/WorkflowWebService.asmx`.

|  | Provided an internet connection is available, the rest of the process will be done for you.

NOTE:

The same procedure is used for writing a Windows Forms application or for a Web Application.

## Example Calls

The following are examples of calling an imported Web Service from .NET languages:

NOTE:

Exception handling should be used in all cases but has been omitted to save space.

C#

    try

     {

       if (ws == null)

           ws = new IWWebSvc();

       LoginType lt;

       String lts = comboBox1.SelectedItem.ToString();

       lt = LoginType.TASK_CENTRE;

       if (lts == "Windows")

       lt = LoginType.WINDOWS;

       string result = ws.Login(textBoxServer.Text, textBoxUsername.Text, textBoxPassword.Text, lt, textBoxDomain.Text);

       listBoxOutput.Items.Add(result);

       }

          catch(Exception ex)

       {

       listBoxOutput.Items.Add(ex.ToString());

       System.Diagnostics.Debug.Write(ex.ToString());

    }

VB

    Try

      Dim result As String

      Dim lt As LoginType

      Dim lts As String

      lts = comboBox1.SelectedItem.ToString()

      lt = LoginType.TASK_CENTRE

      If (lts = "WIndows") Then

        lt = LoginType.WINDOWS

      End If

      result = ws.Login(textBoxServer.Text, textBoxUsername.Text, textBoxPassword.Text, lt, textBoxDomain.Text)

      listBoxOutput.Items.Add(result)

      Catch ex As Exception

        listBoxOutput.Items.Add(ex.ToString())

        System.Diagnostics.Trace.Write(ex.ToString())

    End Try

C++

    try

    {

     WSvc::LoginType lt = WSvc::LoginType::TASK_CENTRE;

       if(comboBox1->SelectedItem->ToString() == "Windows")

       lt = WSvc::LoginType::WINDOWS;

       System::String ^str = ws->Login(textBoxServer->Text, textBoxUsername->Text, textBoxPassword->Text, lt, textBoxDomain->Text);

       System::Diagnostics::Debug::Write(str);

       }

      catch(System::Exception ^ex)

       {

         System::Diagnostics::Debug::Write(ex->ToString());

       }

ASP

The `Microsoft.XMLHTTP` object can be used to perform HTTP GET or PUSH operations on the Web Service. The formatting for the HTTP GET function should be a question mark between the function address and the parameter list. Each parameter separated from the next using an ampersand. The example used here used VBScript embedded is the ASP to perform an HTTP GET on the web service. SOAP could be used by PUSHing XML envelopes as with the Java example.

    <%@ Language=VBScript %>

    <HTML>

      <HEAD>

        <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">

      </HEAD>

      <BODY>

        <%

          'VBScript goes in here

          Dim xml

          Dim Parameters

          Parameters = "server=" & Request.Form.Item("server")

          Parameters = Parameters & "&username=" & Request.Form.Item("username")

          Parameters = Parameters & "&password=" & Server.UrlEncode(Request.Form.Item("password"))

          Parameters = Parameters & "&logintype=TASK_CENTRE"

          Parameters = Parameters & "&domain=NA"

          Set xml = Server.CreateObject("Microsoft.XMLHTTP")

          xml.open "GET", "http://localhost:2250/iwwebsvc/iwwebsvc.asmx/Login?" & Parameters, false

          xml.send

          Dim WhereAt

          WhereAt = InStr(1, xml.responseText, "OK-", 1)

          If WhereAt = 0 then

          Response.Write "Failed to log in: " & xml.responseText

          Else

          Response.Write "Successfully logged in: " & xml.responseText

          End If

          Set xml = nothing

        %>

        <P>&nbsp;</P>

        <p><a href = "index.htm">Return to Index</a></p>

      </BODY>

    </HTML>

## Function References

### WebService : System.Web.Services.WebService

Login
Parameters

|  | `Server` (String) — Specifies the server to log in to.

|  | `Encrypt` (Boolean) — Set to true for basic password encryption.

|  | `Username` (String) — King Task Centre or Windows username.

|  | `Password` (String) — Password used to login to the server, which may be optionally encrypted.

|  | `LoginType` (String) — `BPA`’ for King Task Centre or ‘`Win`’ for Windows.

|  | `Domain` (String) — User domain if Windows login has been specified.

|  | `CommandPort` (String) — Optional command port. This defaults to `4222` if a blank string or no field is specified.

Return Codes

|  | `OK- LOGGEDIN` — Login successfull.

|  | `FAILED-BADUSER` — User name entered not recognised.

|  | `FAILED-BADPASSWORD` — Incorrect password entered.

|  | `FAILED-BADDOMAIN` — Domain name not recognised.

|  | `FAILED-NOTPERMITTED` — User does not have access to the server.

|  | `FAILED-NOTLICENSED` — Not licensed for this functionality.

XML

    POST /WorkflowWebService/WorkflowWebService.asmx HTTP/1.1

    Host: www.mysite.com

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    SOAPAction: "http://www.mysite.com/WorkflowWebService/Login"

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <Login xmlns="http://www.mysite.com/WorkflowWebService/">

          <server>string</server>

          <encrypt>boolean</encrypt>

          <username>string</username>

          <password>string</password>

          <logintype>string</logintype>

          <domain>string</domain>

          <commandport>string</commandport>

        </Login>

      </soap:Body>

    </soap:Envelope>

    HTTP/1.1 200 OK

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <LoginResponse xmlns="http://www.mysite.com/WorkflowWebService/">

          <LoginResult>string</LoginResult>

        </LoginResponse>

      </soap:Body>

    </soap:Envelope>

Logout
Parameters

None

Return Codes

|  | `OK-LOGGEDOUT` — Logged out successfully.

|  | `FAILED–NOTLOGGEDIN` — Failed as not logged in.

XML

    POST /WorkflowWebService/WorkflowWebService.asmx HTTP/1.1

    Host: www.mysite.com

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    SOAPAction: "http://www.mysite.com/WorkflowWebService/Logout"

    HTTP/1.1 200 OK

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <LogoutResponse xmlns="http://www.mysite.com/WorkflowWebService/">

          <LogoutResult>string</LOgoutResult>

        </LogoutResponse>

      </soap:Body>

    </soap:Envelope>

GetFirstWorkflowJob
Parameters

None

Return Codes

|  | `JOBID` — EntryID encoded as 48 character continuous string: 8 for the entry type, 32 for the GUID and 8 for the sequence number

|  | `NAME` — String containing the Job name (commas are not allowed)

|  | `STEP` — Step entryID encoded as 48 character continuous string: 8 for the entry type, 32 for the GUID and 8 for the sequence number

|  | `URL` — Encoded URL, see `HTTPServerUtility.URLEncode()`

|  | `CREATED` — Date and time the job was created in the format `DDMMYYHHMMSS`, where:

|  | `DD` — days

|  | `MM` — months

|  | `YY` — year

|  | `HH` — hours

|  | `MM` — minutes

|  | `SS` — seconds

|  | `MODIFIED` - Date and time the job was created in the format `DDMMYYHHMMSS`, where:

|  | `DD` — days

|  | `MM` — months

|  | `YY` — year

|  | `HH` — hours

|  | `MM` — minutes

|  | `SS` — seconds

|  | `STAGE` — String containing the stage the job is at

|  | `FAILED-NOMOREJOBS` — No Job to display

|  | `FAILED-NOTLOGGEDIN` — Failed as not logged in

|  | `FAILED-NOTLICENSED` — Not licensed for this functionality

|  | `FAILED-NOTPERMITTED` — User does not have access to the server

XML

    POST /WorkflowWebService/WorkflowWebService.asmx HTTP/1.1

    Host: www.mysite.com

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    SOAPAction: "http://www.mysite.com/WorkflowWebService/GetFirstWorkflowJob"

    HTTP/1.1 200 OK

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <GetFirstWorkflowJobResponse xmlns="http://www.mysite.com/WorkflowWebService/">

          <GetFirstWorkflowJobResult>string</GetFirstWorkflowJobResult>

        </GetFirstWorkflowJobResponse>

      </soap:Body>

    </soap:Envelope>

GetNextWorkflowJob
Parameters

None

Return Codes

NOTE:

The Job is returned as a comma separated list of parameters prefixed by a status code.

|  | `OK-JOBID` — EntryID encoded as 48 character continuous string: 8 for the entry type, 32 for the GUID and 8 for the sequence number

|  | `OK-NAME` — String containing the name (commas are not allowed)

|  | `OK-STEP` — Step entryID encoded as 48 character continuous string: 8 for the entry type, 32 for the GUID and 8 for the sequence number

|  | `OK-URL` — Encoded URL, see `HTTPServerUtility.URLEncode()`

|  | `OK-CREATED` — Date and time the job was created in the format DDMMYYHHMMSS, where:

|  | `DD` — days

|  | `MM` — months

|  | `YY` — year

|  | `HH` — hours

|  | `MM` — minutes

|  | `SS` — seconds

|  | `OK-MODIFIED` — Date and time the job was created in the format DDMMYYHHMMSS, where:

|  | `DD` — days

|  | `MM` — months

|  | `YY` — year

|  | `HH` — hours

|  | `MM` — minutes

|  | `SS` — seconds

|  | `OK-STAGE` — String containing the stage the job is at

|  | `FAILED-NOMOREENTRIES` — No further Jobs to display

|  | `FAILED-NOTLOGGEDIN` — Failed as not logged in

|  | `FAILED-NOTLICENSED` — Not licensed for this functionality

|  | `FAILED-NOTPERMITTED` — User does not have access to the server

XML

    POST /WorkflowWebService/WorkflowWebService.asmx HTTP/1.1

    Host: www.mysite.com

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    SOAPAction: "http://www.mysite.com/WorkflowWebService/GetNextWorkflowJob"

    HTTP/1.1 200 OK

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <GetNextWorkflowJobResponse xmlns="http://www.mysite.com/WorkflowWebService/">

        <GetNextWorkflowJobResult>string</GetNextWorkflowJobResult>

        </GetNextWorkflowJobResponse>

      </soap:Body>

    </soap:Envelope>

GetFirstUser
Parameters

None

Return Codes

NOTE:

The user is returned as a comma separated list of parameters prefixed by a status code.

|  | `OK-NAME` — String containing the name (commas are not allowed)

|  | `OK-USERID` — EntryID encoded as 48 character continuous string: 8 for the entry type, 32 for the GUID and 8 for the sequence number

|  | `FAILED-NOMOREENTRIES` — No further users to display

|  | `FAILED-NOTLOGGEDIN` — Failed as not logged in

|  | `FAILED-NOTLICENSED` — Not licensed for this functionality

|  | `FAILED-NOTPERMITTED` — User does not have access to the server

XML

    POST /WorkflowWebService/WorkflowWebService.asmx HTTP/1.1

    Host: www.mysite.com

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    SOAPAction: "http://www.mysite.com/WorkflowWebService/GetFirstUser"

    HTTP/1.1 200 OK

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <GetFirstUserResponse xmlns="http://www.mysite.com/WorkflowWebService/">

          <GetFirstUserResult>string</GetFirstUserResult>

        </GetFirstUserResponse>

      </soap:Body>

    </soap:Envelope>

GetNextUser
Parameters

None

Return Codes

NOTE:

The user is returned as a comma separated list of parameters prefixed by a status code.

|  | `OK-NAME` — String containing the name (commas are not allowed)

|  | `OK-USERID` — EntryID encoded as 48 character continuous string: 8 for the entry type, 32 for the GUID and 8 for the sequence number

|  | `FAILED-NOMOREENTRIES` — No further users to display

|  | `FAILED-NOTLOGGEDIN` — Failed as not logged in

|  | `FAILED-NOTLICENSED` — Not licensed for this functionality

|  | `FAILED-NOTPERMITTED` — User does not have access to the server

XML

    POST /WorkflowWebService/WorkflowWebService.asmx HTTP/1.1

    Host: www.mysite.com

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    SOAPAction: "http://www.mysite.com/WorkflowWebService/GetNextUser"

    HTTP/1.1 200 OK

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <GetNextUserResponse xmlns="http://www.mysite.com/WorkflowWebService/">

          <GetNextUserResult>string</GetNextUserResult>

        </GetNextUserResponse>

      </soap:Body>

    </soap:Envelope>

GetFirstStep
Parameters

None

Return Codes

NOTE:

The Step is returned as a comma separated list of parameters prefixed by a status code.

|  | `OK-STEPNAME` — String containing the Step name (commas are not allowed)

|  | `OK-TASKNAME` — String containing the Task name (commas are not allowed)

|  | `OK-STEPID` — EntryID encoded as 48 character continuous string: 8 for the entry type, 32 for the GUID and 8 for the sequence number

|  | `FAILED-NOMOREENTRIES` — No further Steps to display

|  | `FAILED-NOTLOGGEDIN` — Failed as not logged in

|  | `FAILED-NOTLICENSED` — Not licensed for this functionality

|  | `FAILED-NOTPERMITTED` — User does not have access to the server

XML

    POST /WorkflowWebService/WorkflowWebService.asmx HTTP/1.1

    Host: www.mysite.com

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    SOAPAction: "http://www.mysite.com/WorkflowWebService/GetFirstStep"

    HTTP/1.1 200 OK

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <GetFirstStepResponse xmlns="http://www.mysite.com/WorkflowWebService/">

          <GetFirstStepResult>string</GetFirstStepResult>

        </GetFirstStepResponse>

      </soap:Body>

    </soap:Envelope>

GetNextStep
Parameters

None

Return Codes

NOTE:

The Step is returned as a comma separated list of parameters prefixed by a status code.

|  | `OK-STEPNAME` — String containing the Step name (commas are not allowed)

|  | `OK-TASKNAME` — String containing the Task name (commas are not allowed)

|  | `OK-STEPID` — EntryID encoded as 48 character continuous string: 8 for the entry type, 32 for the GUID and 8 for the sequence number

|  | `FAILED-NOMOREENTRIES` — No further Steps to display

|  | `FAILED-NOTLOGGEDIN` — Failed as not logged in

|  | `FAILED-NOTLICENSED` — Not licensed for this functionality

|  | `FAILED-NOTPERMITTED` — User does not have access to the server

XML

    POST /WorkflowWebService/WorkflowWebService.asmx HTTP/1.1

    Host: www.mysite.com

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    SOAPAction: "http://www.mysite.com/WorkflowWebService/GetNextStep"

    HTTP/1.1 200 OK

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <GetNextStepResponse xmlns="http://www.mysite.com/WorkflowWebService/">

          <GetNextStepResult>string</GetNextStepResult>

        </GetNextStepResponse>

      </soap:Body>

    </soap:Envelope>

AddWorkflowJob
Parameters

|  | `JobName` (String) — Name to give to the new job

|  | `StepID` (String) — Creating step entryID encoded as 48 character continuous string: 8 for the entry type, 32 for the GUID and 8 for the sequence number

|  | `OwnerID` (String) — Assigned user entryID encoded as 48 character continuous string. 8 for the entry type, 32 for the GUID and 8 for the sequence number

Return Codes

NOTE:

The Step is returned as a comma separated list of parameters prefixed by a status code.

|  | `OK-SUCCEEDED`

|  | `FAILED-NOTLOGGEDIN`

|  | `FAILED-NOTLICENSED`

|  | `FAILED-NOTPERMITTED`

|  | `FAILED-INVALIDSTEPID`

|  | `FAILED-STEPNOTFOUND`

|  | `FAILED-INVALIDOWNERID`

|  | `FAILED-OWNERNOTFOUND`

XML

    POST /WorkflowWebService/WorkflowWebService.asmx HTTP/1.1

    Host: www.mysite.com

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    SOAPAction: "http://www.mysite.com/WorkflowWebService/AddWorkflowJob"

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <AddWorkflowJob xmlns="http://www.mysite.com/WorkflowWebService/">

          <jobname>string</jobname>

          <stepID>string</stepID>

          <ownerID>string</ownerID>

        </AddWorkflowJob>

      </soap:Body>

    </soap:Envelope>

    HTTP/1.1 200 OK

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <AddWorkflowJobResponse xmlns="http://www.mysite.com/WorkflowWebService/">

          <AddWorkflowJobResult>string</AddWorkflowJobResult>

        </AddWorkflowJobResponse>

      </soap:Body>

    </soap:Envelope>

DeleteJob
Parameters

|  | `JobID` (String) — Assigned user entryID encoded as 48 character continuous string: 8 for the entry type, 32 for the GUID and 8 for the sequence number

Return Codes

NOTE:

The Step is returned as a comma separated list of parameters prefixed by a status code.

|  | `OK-SUCCEEDED`

|  | `FAILED-NOTLOGGEDIN`

|  | `FAILED-NOTLICENSED`

|  | `FAILED-NOTPERMITTED`

|  | `FAILED-JOBNOTFOUND`

|  | `FAILED-INVALIDJOBID`

XML

    POST /WorkflowWebService/WorkflowWebService.asmx HTTP/1.1

    Host: www.mysite.com

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    SOAPAction: "http://www.mysite.com/WorkflowWebService/DeleteJob"

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <DeleteJob xmlns="http://www.mysite.com/WorkflowWebService/">

          <jobID>string</jobID>

        </DeleteJob>

      </soap:Body>

    </soap:Envelope>

    HTTP/1.1 200 OK

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <DeleteJobResponse xmlns="http://www.mysite.com/WorkflowWebService/">

          <DeleteJobResult>string</DeleteJobResult>

        </DeleteJobResponse>

      </soap:Body>

    </soap:Envelope>

GetStages
Parameters

None

Return Codes

NOTE:

The Step is returned as a comma separated list of parameters prefixed by a status code.

|  | `OK-STAGE` — The Stage name.

|  | `FAILED-NOTLOGGEDIN`

|  | `FAILED-NOTLICENSED`

|  | `FAILED-NOTPERMITTED`

XML

    POST /WorkflowWebService/WorkflowWebService.asmx HTTP/1.1

    Host: www.mysite.com

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    SOAPAction: "http://www.mysite.com/WorkflowWebService/GetStages"

    HTTP/1.1 200 OK

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <GetStagesResponse xmlns="http://www.mysite.com/WorkflowWebService/">

          <GetStagesResult>string</GetStagesResult>

        </GetStagesResponse>

      </soap:Body>

    </soap:Envelope>

ReassignJob
Parameters

|  | `JobID` (String) — Job entry ID encoded as 48 character continuous string: 8 for the entry type, 32 for the GUID and 8 for the sequence number

|  | `UserID` (String) — User entryID encoded as 48 character continuous string: 8 for the entry type, 32 for the GUID and 8 for the sequence number

Return Codes

NOTE:

The Step is returned as a comma separated list of parameters prefixed by a status code.

|  | `OK-SUCCEEDED`

|  | `FAILED-NOTLOGGEDIN`

|  | `FAILED-NOTLICENSED`

|  | `FAILED-NOTPERMITTED`

|  | `FAILED-INVALIDSTEPID`

|  | `FAILED-STEPNOTFOUND`

|  | `FAILED-INVALIDOWNERID`

|  | `FAILED-OWNERNOTFOUND`

XML

    POST /WorkflowWebService/WorkflowWebService.asmx HTTP/1.1

    Host: www.mysite.com

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    SOAPAction: "http://www.mysite.com/WorkflowWebService/ReassignJob"

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <ReassignJob xmlns="http://www.mysite.com/WorkflowWebService/">

          <jobID>string</jobID>

          <userID>string</userID>

        </ReassignJob>

      </soap:Body>

    </soap:Envelope>

    HTTP/1.1 200 OK

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <ReassignJobResponse xmlns="http://www.mysite.com/WorkflowWebService/">

          <ReassignJobResult>string</ReassignJobResult>

        </ReassignJobResponse>

      </soap:Body>

    </soap:Envelope>

SetJobStage
Parameters

|  | `JobID` (String) — Job entry ID encoded as 48 character continuous string: 8 for the entry type, 32 for the GUID and 8 for the sequence number

|  | `Stage` (String) – Stage to set the Job to

Return Codes

NOTE:

The Step is returned as a comma separated list of parameters prefixed by a status code.

|  | `OK-SUCCEEDED`

|  | `FAILED-INVALIDSTAGE`

|  | `FAILED-NOTLOGGEDIN`

|  | `FAILED-NOTLICENSED`

|  | `FAILED-NOTPERMITTED`

|  | `FAILED-JOBNOTFOUND`

|  | `FAILED-INVALIDJOBID`

XML

    POST /WorkflowWebService/WorkflowWebService.asmx HTTP/1.1

    Host: www.mysite.com

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    SOAPAction: "http://www.mysite.com/WorkflowWebService/SetJobStage"

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <SetJobStage xmlns="http://www.mysite.com/WorkflowWebService/">

          <jobID>string</jobID>

          <stage>string</stage>

        </SetJobStage>

      </soap:Body>

    </soap:Envelope>

    HTTP/1.1 200 OK

    Content-Type: text/xml; charset=utf-8

    Content-Length: length

    <?xml version="1.0" encoding="utf-8"?>

    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

      <soap:Body>

        <SetJobStageResponse xmlns="http://www.mysite.com/WorkflowWebService/">

          <SetJobStageResult>string</SetJobStageResult>

        </SetJobStageResponse>

      </soap:Body>

    </soap:Envelope>

## Logging

The log file location will be stored in the registry in:

|  | `HKLM\Software\Quadrant Software B.V.\King Task Centre\WebService\LogDir` — Default to a sub-directory called logs in the site installation directory.

This will be accompanied by:

|  | `HKLM\Software\Quadrant Software B.V.\King Task Centre\WebService\LogLevel` — Refer to the logging component for definitions. Default `3`.

|  | `HKLM\Software\Quadrant Software B.V.\King Task Centre\WebService\LogType` — Refer to logging component for definitions. Default to `1` (event log only).

Copyright © 2018 Quadrant Software B.V. All rights reserved.