Hitachi ID SOAP Web Services API – Create and Submit Workflow Request (WFPDRSubmit) Using Python

In this article I will be showing how to use Python programming language to create a Workflow Request and Submit it for processing by calling the WFPDRSubmit Function. This function is among the many functions exposed by the Hitachi ID SOAP Web Services API.

This blog entry piggybacks on the introduction to Hitachi ID SOAP API previously published at Hitachi ID Soap Web Services API – Calling the Login Function Using Python.


The WFPDRSubmit function will accept all the attributes required for successful creation and submission of a Request. The Request will in turn be submitted to and processed by a Predefined Request(PDR) which is specified as part of the Request attribute . Below is the general form of the input and output for this function








  •  Hitachi ID Suite 10.x and above
  •  Corporate Reference Build
  •  Python


Assuming that the SOAP API Service is already setup per the information provided in my previous post, a fully functional Predefined Request(PDR) is required before the WFPDRSubmit function can be executed successfully. We will be using the NEW-EMPLOYEE PDR which comes pre-configured by installing the Corporate Reference Build (Read the Hitachi ID documentation titled “Component-Reference”) to know more.

Execute the following python script

from zeep import Client
from idmlib.components import component_log

log = component_log.getChild(__name__)


    def __init__(self):
        self.instancename = '<INSTANCENAME>'
        self.servername = '<SERVERNAME>'
        self.sessdat = None'starting SOAP Client...')
        wsdl = 'http://{}/{}/idapi/wsdl'.format(self.servername, self.instancename)'wsdl : ' + wsdl)
        self.iw =  Client(wsdl=wsdl)

    def login(self):'start Login...')
        request_data = {
            'userid': 'IDAPI_SOAP_USER',
            'password': '******',
            'isadmin': 1,
            'options': '',
            'sessdat': self.sessdat
        return self.iw.service.Login(request_data)

    def wfpdrsubmitfunction(self, sessdat):'Submitting PDR  requesting info...')
        wf_input = {'WFPDRSubmit_vectorInput':[{'attrkey': 'FIRST_NAME','value': 'John',},{'attrkey': 'LAST_NAME','value': 'Doe',}]}
        request_data= {
            'recipid': '<recipientAccountname>',
            'recipemail': '<recipientEmail>',
            'requesteremail': '<requesterEmail>',
            'requestreason': '<requesterReason>',
            'preqid': 'NEW-EMPLOYEE',
            'reserveid' : '',
            'maqid': '',
            'parentbatchsig': '1',
            'sessdat': sessdat,
            'input': wf_input
        return self.iw.service.WFPDRSubmit(request_data)
	def logout(self, sessdat):'start Logout...')
        request_data = {'sessdat': sessdat}
        return self.iw.service.Logout(request_data)

#login, get sessdat
print('logging in.......>')
loginresponse = IDAPI_SOAP_WEBSERVICE().login()

#logged in,
print('Getting session data')
sessdat = loginresponse['sessdat']

#Submitting the request
print('submitting the request..##..>')
wfrequestresponse = IDAPI_SOAP_WEBSERVICE().wfpdrsubmitfunction(sessdat)

#logout, send sessdat
print('loging out <.......')
logoutresponse = IDAPI_SOAP_WEBSERVICE().logout(sessdat)

Once the WFPDRSubmit function is successfully executed, the Request entry can be viewed using the Reporting feature of the HiIDM Suite.

A typical scenario where this function is useful is Bulk provisioning where large amount of data needs to be processed via a specific PDR in Hitachi ID Suite from other enterprise applications.