20.3 プロビジョニングWebサービスのAPI

この節では、プロビジョニングWebサービスのメソッドの詳細を説明します。

すべてのメソッドが、com.novell.soa.af.impl.soap.AdminExceptionとjava.rmi.RemoteExceptionをスローします。 読みやすくするために、メソッドの署名のthrows節は省略されています。

この項では、次のトピックについて説明します。

20.3.1 プロセス

この節は、各プロセスメソッドに関する参照情報を取り上げています。メソッドには次のものが含まれています。

getProcessesByQuery

プロセスに関する情報を取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.ProcessArray getProcessesByQuery(com.novell.soa.af.impl.soap.T_ProcessInfoQuery query, int maxRecords) 
        //       
	 // Query information about processes for a user that are running and
        // have not been approved yet.
        String logic = "AND";
        T_ProcessInfoOrder order = T_ProcessInfoOrder.APPROVAL_STATUS;
        int CHOICE_SIZE = 4;
        Integer approvalStatusInteger = new Integer(ProcessConstants.PROCESSING);
        Integer processStatusInteger = new Integer(ProcessConstants.RUNNING);
        //
        // Setup the query with the above params
        T_ProcessInfoQueryChoice [] choice = new T_ProcessInfoQueryChoice[CHOICE_SIZE];
        choice[0] = new T_ProcessInfoQueryChoice();
        choice[0].setApprovalStatus(approvalStatusInteger);
        choice[1] = new T_ProcessInfoQueryChoice();
        choice[1].setProcessStatus(processStatusInteger);
        choice[2] = new T_ProcessInfoQueryChoice();
        choice[2].setRecipient(recipient);
        choice[3] = new T_ProcessInfoQueryChoice();
        choice[3].setRequestId(requestId); 
        int maxRecords = -1;
        T_ProcessInfoQuery processInfoQuery =                new T_ProcessInfoQuery(T_Logic.fromString(logic), order, choice);
        ProcessArray processArray = stub.getProcessesByQuery(processInfoQuery, maxRecords);

getProcessesByStatus

指定したステータス(たとえば、実行中のプロセスなど)のプロセスに関する情報を取得する場合に使用します。

メソッドの署名
public com.novell.soa.af.impl.soap.ProcessArray getProcessesByStatus(com.novell.soa.af.impl.soap.T_ProcessStatus status)
      T_ProcessStatus processStatus = T_ProcessStatus.Running;
      //
      // Get processes by status
       ProcessArray processArray = stub.getProcessesByStatus(processStatus);
       Process [] process = processArray.getProcess();

getProcesses

プロセスIDで指定したプロセスに関する情報を取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.ProcessArray getProcesses(java.lang.String id, long time,com.novell.soa.af.impl.soap.T_Operator op, java.lang.String initiator, java.lang.String recipient) 
パラメータ

パラメータ

説明

processId

プロセスIDです(java.lang.String)。

creationTime

プロセスが開始された時刻です(long)。

op

使用する演算子です。次の演算子を使用できます。

  • EQ - 等しい
  • LT - 未満
  • LE - 以下
  • GT - より大きい
  • GE - 以上

イニシエータ

ワークフローのイニシエータです。

recipient

承認アクティビティの受信者です。

       int processMatchCount = 0;
       T_Operator operator = T_Operator.GT;
       long currentTimeInMillis = System.currentTimeMillis();
       String [] requestIds = requestIdArray.getString();
       //
       // Initialize and start a provisioning request
       HashMap provMap = new HashMap();
       provMap.put(Helper.RECIPIENT, recipient);
       provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");
       //
       // Start request
       // Calls method startProvisioningRequest on the provUtils
       // utility object which refers to a utility class that does not
       // ship with the Identity Manager User Application.
String requestId = provUtils.startProvisioningRequest(provMap, null);
       sleep(5);
       Process process = stub.getProcess(requestId);
       if(process != null)
       {
            String processId = process.getProcessId();
            String initiator = process.getInitiator();

            ProcessArray processArray = stub.getProcesses(processId, currentTimeInMillis, operator, initiator, recipient);
       }

getAllProcesses

実行中および完了したすべてのプロビジョニング要求に関する情報を取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.ProcessArray getAllProcesses()
    ProcessArray array = stub.getAllProcesses();
    Process [] processes = array.getProcess();
     if(_process != null)
    {
        sb = new StringBuffer();
        sb.append("\nProcess List:");
        for(int index = 0; index < _process.length; index++)
        {
            String processId = _process[index].getProcessId();
            String approvalStatus = _process[index].getApprovalStatus();
            Calendar completionTime = _process[index].getCompletionTime();
            Calendar creationTime = _process[index].getCreationTime();
            String engineId = _process[index].getEngineId();
            String proxy = _process[index].getProxy();
            String initiator = _process[index].getInitiator();
            String processName = _process[index].getProcessName();
            String processStatus = _process[index].getProcessStatus();
            String p_recipient = _process[index].getRecipient();
            String p_requestId = _process[index].getRequestId();
            int valueOfapprovalStatus = _process[index].getValueOfApprovalStatus();
            int valueOfprocessStatus = _process[index].getValueOfProcessStatus();
            String version = _process[index].getVersion();
        }

getProcessesArray

返されるプロセス数を制限する場合に使用します。ここに指定した値がシステムの制限値よりも小さい場合は、ここに指定した数のプロセスが返されます。システム制限値を超える値を指定した場合は、システム制限値に設定された数のプロセスが返されます。0以下の値を指定した場合は、すべてのプロセスが返されます。

メソッドの署名
com.novell.soa.af.impl.soap.ProcessArray getProcessesArray(int maxRecords);
    /**
     * Method to augment the getAllProcesses() method that impose limits
     * on the number of processes returned.
     * @throws TestProgramException
     */
    public void adding_Limits_To_getProcessArray_TestCase()
    throws TestProgramException
    {
        String recipient = ServiceUtils.getInstance().getLoginData().getUsername(LoginData.RECIPIENT_TYPE);
        String requestNameToStart = provUtils.getProvisioningResourceNameForRecipient(recipient,                 "Enable Active Directory");
        //
        // Get the stub
        Provisioning stub = ServiceUtils.getInstance().getProvisioningStub();
        try
        {
            //
            // Start multiple requests
            final int NUMBER_OF_REQUESTS_TO_START = 2;

            Map map = MapUtils.createAndSetMap(new Object[] {
                    Helper.RECIPIENT, recipient,
                   
IProvisioningConstants.PROVISIONING_REQUEST_TO_START, requestNameToStart});
            //
            // Start request(s)
            StringArray requestIdArray = 
                provUtils.startMultipleProvisioningRequests(map, null, NUMBER_OF_REQUESTS_TO_START);
            LoggerUtils.sleep(3);
            LoggerUtils.sendToLogAndConsole("Started " + NUMBER_OF_REQUESTS_TO_START + " provisioning requests");
            //
            // New method to limit the number of processes returned
            //
            // Test Results : maxProcesses <= 0 returns all processes
            //                maxProcesses up to system limit returns maxProcess count
            //                maxProcesses > system limit returns system limit
            int maxProcesses = 10;
            ProcessArray processArray = stub.getProcessesArray(maxProcesses);
            Process [] processes = processArray.getProcess();
            if(processes != null)
            {
                LoggerUtils.sendToLogAndConsole("Process count returned: " + processes.length);
                Assert.assertEquals("Error: Processes returned shouldn't exceed max count.",
                        maxProcesses, processes.length);
            }
        }
        catch(AdminException error) 
        {
            RationalTestScript.logError(error.getReason() );
            throw new TestProgramException(error.getReason() );
        }
        catch(RemoteException error) 
        {
            RationalTestScript.logError(error.getMessage() );
            throw new TestProgramException(error.getMessage() );
        }
    }    

getProcessesById

プロセスIDで指定したプロセスに関する情報を取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.ProcessArray getProcessesById(java.lang.String id)
    Process [] allProcesses = stub.getAllProcesses().getProcess();
    if(allProcesses != null)
    {
          String processId = allProcesses[0].getProcessId;
          ProcessArray array = stub.getProcessesById(processId);
          Process [] processes = array.getProcess();
     }

terminate

実行中のプロビジョニング要求を停止する場合に使用します。

メソッドの署名
void terminate(java.lang.String requestId, com.novell.soa.af.impl.soap.T_TerminationType state, java.lang.String comment) 
パラメータ

パラメータ

説明

requestId

プロビジョニング要求のIDです。

都道府県

プロセス停止の理由です。次の選択肢があります。

RETRACT

エラー

comment

停止アクションに関するコメントを追加します。

     //
     // Initialize and start a provisioning request
     HashMap provMap = new HashMap();
     provMap.put(Helper.RECIPIENT, recipient);
     provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");
     //
     // Start request 
     // Calls method startProvisioningRequest on the provUtils
     // utility object which refers to a utility class that does not
     // ship with the Identity Manager User Application.
String requestId = provUtils.startProvisioningRequest(provMap, null);
     sleep(5);
     //
     // Now retract the request
     T_TerminationType terminationType = T_TerminationType.RETRACT;
    stub.terminate(requestId, terminationType, terminationType.getValue() + " the request");

getProcess

要求IDで指定する、動作中または完了したプロビジョニング要求に関する情報を取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.Process getProcess(java.lang.String requestId) 
     //     // Initialize and start a provisioning request     HashMap provMap = new HashMap();     provMap.put(Helper.RECIPIENT, recipient);     provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");     //     // Start request
       // Calls method startProvisioningRequest on the provUtils       // utility object which refers to a utility class that does not       // ship with the Identity Manager User Application.     String requestId = provUtils.startProvisioningRequest(provMap, null);     sleep(5);     Process process = stub.getProcess(requestId);
    if(process != null)
    {
        boolean bMatchProcess = false;
        if( (recipient.compareTo(process.getRecipient()) == 0) && (requestId.compareTo(process.getRequestId()) == 0) )
        {
            bMatchProcess = true;
        }
        if(bMatchProcess)
        {
            String msg = "Found process with requestId : " + requestId;
            LoggerUtils.sendToLogAndConsole(msg);
        }
        //
        // Assert if we could not find a match
        Assert.assertTrue("Could not find process with request id: " + requestId, bMatchProcess);
    }

getProcessesByCreationTime

ワークフロープロセスの作成時刻から現在の時刻までに作成されたプロセスに関する情報を取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.ProcessArray getProcessesByCreationTime(long time, com.novell.soa.af.impl.soap.T_Operator op)
パラメータ

パラメータ

説明

creationTime

プロセスが開始された時刻です。

op

使用する演算子です。次の演算子を使用できます。

  • EQ - 等しい
  • LT - 未満
  • LE - 以下
  • GT - より大きい
  • GE - 以上
     T_Operator operator = T_Operator.GT;
    //
    // Get processes with operator relative to the current time
    long currentTime = System.currentTimeMillis();//currentDateTime.getTime();
    ProcessArray processArray = stub.getProcessesByCreationTime(currentTime, operator);

getProcessesByApprovalStatus

指定した承認ステータス(Approved(承認)、Denied(拒否)、Retracted(撤回))のプロセスに関する情報を取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.ProcessArray getProcessesByApprovalStatus(com.novell.soa.af.impl.soap.T_ApprovalStatus status)
    T_ApprovalStatus approvalStatus = T_ApprovalStatus.Approved;
    //
    // Get all the processes based upon approval status above
    ProcessArray processArray = stub.getProcessesByApprovalStatus(approvalStatus);
    Process [] processes = processArray.getProcess();

getProcessesByRecipient

特定の受信者IDを持つプロセスに関する情報を取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.ProcessArray getProcessesByRecipient(java.lang.String recipient) 
    String recipient = "cn=ablake,ou=users,ou=idmsample-komodo,o=novell";

    //
    // Get processes by recipient
    ProcessArray processArray = stub.getProcessesByRecipient(recipient);
    Process [] process = processArray.getProcess();

getProcessesByInitiator

特定のイニシエータIDを持つプロセスに関する情報を取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.ProcessArray getProcessesByInitiator(java.lang.String initiator)
    String initiator = "cn=admin,ou=idmsample-komodo,o=novell";

    //
    // Get processes by initiator
    ProcessArray processArray = stub.getProcessesByInitiator(initiator);
    Process [] process = processArray.getProcess();

setResult

以前に完了したプロビジョニング要求のエンタイトルメント結果(承認ステータス)を設定する場合に使用します。

メソッドの署名
void setResult(java.lang.String requestId, com.novell.soa.af.impl.soap.T_EntitlementState state, com.novell.soa.af.impl.soap.T_EntitlementStatus status, java.lang.String message)
パラメータ

パラメータ

説明

requestId

プロビジョニング要求のIDです。

都道府県

プロビジョニング要求の状態です次の値を使用できます。

  • Unknown (不明)、
  • Granted (認可)、
  • Revoked (取り消し)

status

プロビジョニング要求のステータスです次の値を使用できます。

  • Unknown (不明)、
  • Success (成功)、
  • Warning (警告)、
  • Error (エラー)、
  • Fatal (致命的エラー)、
  • Submitted (送信済み)

メッセージ

エンタイトルメント結果に関するメッセージです。

     //
     // Initialize and start a provisioning request
     HashMap provMap = new HashMap();
     provMap.put(Helper.RECIPIENT, recipient);
     provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");
     //
     // Start request
     // Calls method startProvisioningRequest on the provUtils
     // utility object which refers to a utility class that does not
     // ship with the Identity Manager User Application.
     String requestId = provUtils.startProvisioningRequest(provMap, null);
     sleep(5);

     //
     // Get the process id for this running process
     Process process = stub.getProcess(requestId);
     String processId = null;
     if (process != null)
        processId = process.getProcessId();
    //
    // Reset the state of the provisioning request
    T_EntitlementState newEntitlementState =
T_EntitlementState.Revoked;
    T_EntitlementStatus newEntitlementStatus = T_EntitlementStatus.Success;
    String comment = "Revoked the provisioning request";
    stub.setResult(processId, newEntitlementState, newEntitlementStatus, comment); 

getProcessesByCreationInterval

2つの時間で指定された期間内に開始されたプロセスに関する情報を取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.ProcessArray getProcessesByCreationInterval(long start, long end) 
パラメータ

パラメータ

説明

startTime

開始時刻(YYYY/MM/DD)です。

endTime

終了時刻(YYYY/MM/DD)です。

     long startTime = System.currentTimeMillis();
     //
     // Initialize and start a provisioning request
     HashMap provMap = new HashMap();
     provMap.put(Helper.RECIPIENT, recipient);
     provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");
     //
     // Start request
     // Calls method startProvisioningRequest on the provUtils
     // utility object which refers to a utility class that does not
     // ship with the Identity Manager User Application.
     String requestId = provUtils.startProvisioningRequest(provMap, null);
     sleep(5);

    long endTime = System.currentTimeMillis();
    //
    // Get all the processes between the start and end time    ProcessArray processArray = stub.getProcessesByCreationInterval(startTime, endTime);
    Process [] processes = processArray.getProcess();

20.3.2 プロビジョニング

この節は、各プロビジョニングメソッドに関する参照情報を取り上げています。プロビジョニングメソッドには次のものが含まれています。

multiStart

指定した各受信者に対するワークフロー要求を開始する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.StringArray multiStart(java.lang.String processId, com.novell.soa.af.impl.soap.StringArray recipients, com.novell.soa.af.impl.soap.DataItemArray items) 
パラメータ

パラメータ

説明

processId

開始するプロビジョニング要求のIDです。

受信者

各受信者のDNです。

dataItem

プロビジョニング要求のデータ項目のリストです。

     ProvisioningRequestArray requestArray = stub.getAllProvisioningRequests(recipient);
    //
    // If there are some then,
    if(requestArray != null)
    {
        String Id = " ";
        StringArray requestIdStringArray = null;
        String [] listOfRecipients = {recipient, addressee};
        //
        // Select a provisioning resource
        String requestNameToStart = "Enable Active Directory Account (Mgr Approve-No Timeout)";
        //
        // Loop thru and find the request that we want to start
        ProvisioningRequest [] requests = requestArray.getProvisioningrequest();
        for(int index = 0; index < requests.length; index++)
        {
            //
            // Is this the name of the request to start?
            if(requests[index].getName().compareTo(requestNameToStart) == 0)
            {
                //
                // Get the current associated data items. Replicate a new
                // dataitem array excluding the null values.
                Id = requests[index].getId();
                DataItem [] dataItem = requests[index].getItems().getDataitem();
                if(dataItem != null)
                // Call method replicateDataItemArray on the
                // provUtils utility object, which refers to a 
                // utility class that does not ship with the 
                // Identity Manager User Application.
                {
                    DataItemArray newDataItemArray = provUtils.replicateDataItemArray(dataItem);
                    //
                    // Create a string array initializing with multiple recipients
                    StringArray listOfRecipientsStringArray = new StringArray(listOfRecipients);
                    //
                   // Start the request for multiple recipients
                    logStep("Calling stub.multiStart(" + Id + ",listOfRecipientsStringArray,newDataItemArray)");
                    requestIdStringArray = stub.multiStart(Id, listOfRecipientsStringArray, newDataItemArray);
            }
        }
} 

start

プロビジョニング要求を開始する場合に使用します。

メソッドの署名
java.lang.String start(java.lang.String processId, java.lang.String recipient, com.novell.soa.af.impl.soap.DataItemArray items)
パラメータ

パラメータ

説明

processId

開始するプロビジョニング要求のIDです。

recipient

各受信者のDNです。

dataItem

プロビジョニング要求のデータ項目のリストです。

       //
       // Initialize and start a provisioning request
       HashMap provMap = new HashMap();
       provMap.put(Helper.RECIPIENT, recipient);
       provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");
       //
       // Start request
       // Calls method startProvisioningRequest on the provUtils
       // utility object which refers to a utility class that does not
       // ship with the Identity Manager User Application.
       String requestId = provUtils.startProvisioningRequest(provMap, null);
       sleep(5);

上記の例では、startProvisioningRequestメソッドを呼び出しています。このメソッドは、IDMユーザアプリケーションの一部ではありません。ここでは、例を完了させるためにこれを使用しています。

          /**
           *Method to start a provisioning request using the supplied
           *Map and dataitem object. Handling of digital certificate
           *resources is also handled.
           * @param _map
           * @param _in_dataItem
           * @return String
           * @throws TestProgrammException
           */
          public String startProvisioningRequest(Map _map, DataItem []
          _in_dataItem) throws TestProgramException
         {
            String requestId = null;
            try
            {
               String recipient  =(String)_map.get(Helper.RECIPIENT);
               String requestToStart = (String)_map.get(IProvisioningConstants.PROVISIONING_REQUEST_TO_START);
               String proxyUser  =(String)_map.get(IWorkFlowConstants.PROXY_USER);
               String digitalSignature = String)_map.get(IDigitalSignatureConstants.DIGITAL_SIGNATURE);
               RationalTestScript.logInfo("Step: Calling startProvisioningRequest(_map)");
               //
               //Get the stub
               Provisioning stub = ServiceUtils.getInstance().getProvisioningStub();
               //
       //Get all the available resource requests for the recipient
       RationalTestScript.logInfo("Step: Calling stub.getAllProvisioningRequests(" + recipient + ")");
       ProvisioningRequestArray requestArray = stub.getAllProvisioningRequests(recipient);

       if(requestArray != null)
       {
           //
           //Get the provisioning request from the array
           ProvisioningRequest request = getProvisioningRequestFromArray(requestArray, requestToStart);
           if(request != null)
       {
       DataItem [] dataItem = null;
       DataItemArray newDataItemArray = null;
       //
       // If the supplied data item is null then just replicate
       // what currently exists with the request.
       if(_in_dataItem == null)
       {
           //
           // Use the current data item associated with the request
           dataItem = request.getItems().getDataitem();
           if(dataItem != null)
           {
               newDataItemArray = replicateDataItemArray(dataItem);
           }
       }
       else
       {
           //
           // Set the incoming data item array
           newDataItemArray = new DataItemArray();
           newDataItemArray.setDataitem(_in_dataItem);
       }
       //
       // Start the Provisioning request for the recipient
       if(proxyUser == null && digitalSignature == null)
          {
              RationalTestScript.logInfo("Step: Calling stub.start(" + request.getId() + "," + recipient + "dataItemArray)");
                        requestId = stub.start(
                                request.getId(),
                                recipient,
                                newDataItemArray);
          }
           else if(proxyUser != null && digitalSignature == null)
           }
                 .
           .
          .
                             

getAllProvisioningRequests

利用可能なプロビジョニング要求の配列を返す場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.ProvisioningRequestArray  getAllProvisioningRequests(java.lang.String recipient)
    //
    // Get all the provisioning requests for this recipient

    ProvisioningRequestArray provReqArray = stub.getAllProvisioningRequests(recipient);
    ProvisioningRequest [] provRequest = provReqArray.getProvisioningrequest();
    if(provRequest != null)
    {
        String description = provRequest[0].getDescription();
        String category = provRequest[0].getCategory();
        String digitialSignatureType = provRequest[0].getDigitalSignatureType();
        String requestId = provRequest[0].getId();
        DataItemArray itemArray = provRequest[0].getItems();
        String legalDisclaimer = provRequest[0].getLegalDisclaimer();
        String name = provRequest[0].getName();
        String operation = provRequest[0].getOperation();
    }

getProvisioningRequests

特定のカテゴリや操作のプロビジョニング要求の配列を返す場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.ProvisioningRequestArray  getProvisioningRequests(java.lang.String recipient, java.lang.String category, java.lang.String operation) 
パラメータ

パラメータ

説明

recipient

プロビジョニング要求の受信者です。

category

プロビジョニング要求のカテゴリです。

operation

プロビジョニング要求の操作です(0=認可、1=取り消し、2=両方)。

    String operation = IProvisioningRequest.GRANT;
    try
    {
        //
        // Get the stub
        Provisioning stub = ServiceUtils.getInstance().getProvisioningStub();
        logStep("Calling stub.getProvisioningCategories()");
        StringArray categoriesStringArray = stub.getProvisioningCategories();
        String [] categories = categoriesStringArray.getString();
        //
        // Loop thru and get the provisioning requests for each category
        for(int index = 0; index < categories.length; index++)
        {
            //
            // Get the provisioning request based upon recipient
            logStep("Calling stub.getProvisioningRequests(" + recipient + "," + categories[index] + "," + operation + ")");
            ProvisioningRequestArray provRequestArray = stub.getProvisioningRequests(recipient, categories[index], operation);
            ProvisioningRequest [] provRequests = provRequestArray.getProvisioningrequest();
        }

getProvisioningCategories

メソッドの署名
com.novell.soa.af.impl.soap.StringArray getProvisioningCategories() 
       StringArray categoriesStringArray = stub.getProvisioningCategories();
       String [] categories = categoriesStringArray.getString();

startAsProxy

 

メソッドの署名
java.lang.String startAsProxy(java.lang.String processId, java.lang.String recipient, com.novell.soa.af.impl.soap.DataItemArray items, java.lang.String proxyUser)
パラメータ

パラメータ

説明

processId

プロビジョニング要求のIDです。

recipient

プロビジョニング要求の受信者です。

項目

プロビジョニング要求のデータ項目です。

proxyUser

代理人ユーザのDNです。

    ProvisioningRequestArray requestArray = stub.getAllProvisioningRequests(recipient);
    //
    // If there are some then,
    if(requestArray != null)
    {
        String Id = " ";
        String requestId = " ";
        String requestNameToStart = "Enable Active Directory Account (Mgr Approve-No Timeout)";
        //
        // Loop thru and find the request that we want to start
        ProvisioningRequest [] requests = requestArray.getProvisioningrequest();
        for(int index = 0; index < requests.length; index++)
        {
            //
            // Is this the name of the request to start?
            if(requests[index].getName().compareTo(requestNameToStart) == 0)
            {
                //
                // Get the current associated data items. Replicate a new
                // dataitem array excluding the null values.
                Id = requests[index].getId();
                DataItem [] dataItem = requests[index].getItems().getDataitem();
                if(dataItem != null)
                {
                    // Call method replicateDataItemArray on the
                    // provUtils utility object, which refers to a 
                    // utility class that does not ship with the 
                    // Identity Manager User Application.
                    DataItemArray newDataItemArray = provUtils.replicateDataItemArray(dataItem);
                    //
                    // Start the Provisioning request for the recipient
                    logStep("Calling stub.startAsProxy(" + Id + "," + recipient + ",newDataItemArray," + proxyUser + ")");
                    requestId = stub.startAsProxy(Id, recipient, newDataItemArray, proxyUser);
                }
            }
        }
    }

getProvisioningStatuses

プロビジョニング要求のステータスを取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.ProvisioningStatusArray  getProvisioningStatuses(com.novell.soa.af.impl.soap.T_ProvisioningStatusQuery query, int maxRecords) 
パラメータ

パラメータ

説明

クエリー

プロビジョニングステータスクエリを指定する場合に使用します。クエリには、次のコンポーネントがあります。

  • choice - 結果をフィルタリングする場合に使用するパラメータです。 複数のパラメータを指定することができます。次のパラメータを使用できます。

    • Recipient - DN、
    • RequestID、
    • ActivityID、
    • Status (整数)、
    • State (整数)、
    • ProvisioningTime (YYYY/MM/DD)、
    • ResultTime (YYYY/MM/DD)
  • logic - ANDまたはORです。

  • order - 結果のソート順を指定します。 orderに指定できる値を次に示します。

    • ACTIVITY_ID、
    • RECIPIENT、
    • PROVISIONING_TIME 、
    • RESULT_TIME 、
    • STATE 、
    • STATUS 、
    • REQUEST_ID 、
    • MESSAGE 、

maxRecords

取得する最大レコード数を指定する場合に使用します。-1を指定すると、返されるレコード数に制限はありません。

     //
     // Initialize and start a provisioning request
     HashMap provMap = new HashMap();
     provMap.put(Helper.RECIPIENT, recipient);
     provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");
     //
     // Start request
     // Calls method startProvisioningRequest on the provUtils
     // utility object which refers to a utility class that does not
     // ship with the Identity Manager User Application.
     String requestId = provUtils.startProvisioningRequest(provMap, null);
     sleep(5);
     //
     //
    T_ProvisioningStatusQueryChoice [] choice = new T_ProvisioningStatusQueryChoice[3];
    choice[0] = new T_ProvisioningStatusQueryChoice();
    choice[0].setRecipient(recipient);
    choice[1] = new T_ProvisioningStatusQueryChoice();
    choice[1].setRequestId(requestId);
    choice[2] = new T_ProvisioningStatusQueryChoice();
    choice[2].setStatus(new Integer(ProcessConstants.PROCESSING) );
    //
    // Initialize the query
    T_ProvisioningStatusQuery query = new T_ProvisioningStatusQuery(T_Logic.AND, T_ProvisioningStatusOrder.STATUS, choice);
    //
    // Make the query
    StringBuffer sb = new StringBuffer();
    int maxRecords = -1;

    ProvisioningStatusArray provStatusArray = stub.getProvisioningStatuses(query, maxRecords);

startWithDigitalSignature

ワークフローを開始し、デジタル署名が必要なことを指定する場合に使用します。

メソッドの署名
java.lang.String startWithDigitalSignature(java.lang.String processId, java.lang.String recipient, com.novell.soa.af.impl.soap.DataItemArray items, java.lang.String digitalSignature, com.novell.soa.af.impl.soap.SignaturePropertyArray digitalSignaturePropertyArray)
パラメータ

パラメータ

説明

processId

要求のIDです。

recipient

要求の受信者です。

項目

プロビジョニング要求のデータ項目です。

デジタル署名

デジタル署名です。

digitalSignaturePropertyArray.

デジタル署名プロパティマップです。

    String recipient = ServiceUtils.getInstance().getLoginData().getUsername(LoginData.RECIPIENT_TYPE);
    //
    // Get the digital signature string for admin
    String digitalSignature = DigitalSignatureUtils.getDigitalSignatureFromFile(IDigitalSignatureConstants.ADMIN_DIGITAL_SIGNATURE_FILENAME);
 

    ProvisioningRequestArray requestArray = stub.getAllProvisioningRequests(recipient);
    //
    // If there are some then,

   if(requestArray != null)
    {
        String Id = " ";
        String requestId = " ";
        String requestNameToStart = "Enable Active Directory Account (Mgr Approve-No Timeout)";
        //
        // Loop thru and find the request that we want to start
        ProvisioningRequest [] requests = requestArray.getProvisioningrequest();
        for(int index = 0; index < requests.length; index++)
        {
            //
            // Is this the name of the request to start?
            if(requests[index].getName().compareTo(requestNameToStart) == 0)
            {
                //
                // Get the current associated data items. Replicate a new
                // dataitem array excluding the null values.
                Id = requests[index].getId();
                DataItem [] dataItem = requests[index].getItems().getDataitem();
                if(dataItem != null)
                {
                    // Call method replicateDataItemArray on the
                    // provUtils utility object, which refers to a 
                    // utility class that does not ship with the 
                    // Identity Manager User Application.
                    DataItemArray newDataItemArray = provUtils.replicateDataItemArray(dataItem);
                    //
                    // Start a digitally signed provisioning resource for the recipient
                    requestId = stub.startWithDigitalSignature(request.getId(), recipient, newDataItemArray, digitalSignature, null); // Don't get any property values (optional)
                }
            }
        }
    }

startAsProxyWithDigitalSignature

代理人をイニシエータとしてワークフローを開始し、デジタル署名が必要なことを指定する場合に使用します。

メソッドの署名
java.lang.String startAsProxyWithDigitalSignature(java.lang.String processId, java.lang.String recipient, com.novell.soa.af.impl.soap.DataItemArray items, java.lang.String digitalSignature, com.novell.soa.af.impl.soap.SignaturePropertyArray digitalSignaturePropertyArray, java.lang.String proxyUser)
パラメータ

パラメータ

説明

processId

要求のIDです。

recipient

要求の受信者です。

項目

プロビジョニング要求のデータ項目です。

デジタル署名

デジタル署名です。

digitalSignaturePropertyArray.

デジタル署名プロパティマップです。

proxyUser

代理人ユーザのDNです。

    //
    // Get the digital signature string for admin
    String digitalSignature = DigitalSignatureUtils.getDigitalSignatureFromFile(IDigitalSignatureConstants.ADMIN_DIGITAL_SIGNATURE_FILENAME);
 
    ProvisioningRequestArray requestArray = stub.getAllProvisioningRequests(recipient);
    //
    // If there are some then,
    if(requestArray != null)
    {
        String Id = " ";
        String requestId = " ";
        String requestNameToStart = "Enable Active Directory Account (Mgr Approve-No Timeout)";
        //
        // Loop thru and find the request that we want to start
        ProvisioningRequest [] requests = requestArray.getProvisioningrequest();
        for(int index = 0; index < requests.length; index++)
        {
            //
            // Is this the name of the request to start?
            if(requests[index].getName().compareTo(requestNameToStart) == 0)
            {
                //
                // Get the current associated data items. Replicate a new
                // dataitem array excluding the null values.
                Id = requests[index].getId();
                DataItem [] dataItem = requests[index].getItems().getDataitem();
                if(dataItem != null)
                {
                    // Call method replicateDataItemArray on the
                    // provUtils utility object, which refers to a 
                    // utility class that does not ship with the 
                    // Identity Manager User Application.
                    DataItemArray newDataItemArray = provUtils.replicateDataItemArray(dataItem);
                    //
                    // Start a digitally signed provisioning resource as  proxy for the recipient
                     requestId = stub.startAsProxyWithDigitalSignature(request.getId(), recipient, newDataItemArray, digitalSignature, null, proxyUser);
                }
            }
        }
    }

startWithCorrelationId

correlation IDを使ってワークフローを開始する場合に使用します。correlation IDは、関連するワークフロープロセスセットを追跡する方法を提供しています。このメソッドで開始したワークフロープロセスは、クエリしたり、correlation IDでソートすることができます。

メソッドの署名
java.lang.String startWithCorrelationId(java.lang.String processId, java.lang.String recipient, com.novell.soa.af.impl.soap.DataItemArray items, java.lang.String signature, com.novell.soa.af.impl.soap.SignaturePropertyArray props, java.lang.String proxyUser, java.lang.String correlationId)     throws com.novell.soa.af.impl.soap.AdminException, java.rmi.RemoteException; 
パラメータ

パラメータ

説明

processId

要求のIDです。

recipient

要求の受信者です。

項目

プロビジョニング要求のデータ項目です。

デジタル署名

デジタル署名です。

digitalSignaturePropertyArray

デジタル署名プロパティマップです。

proxyUser

代理人ユーザのDNです。

correlationID

correlation IDを識別する文字列です。correlation IDは32文字以下でなければなりません。

20.3.3 ワークエントリ

この節は、各ワークエントリメソッドに関する参照情報を取り上げています。ワークエントリメソッドには、次のものが含まれています。

転送

タスクを、ワークフロー内の適切なアクション(承認、却下、拒否)がある次のアクティビティに転送する場合に使用します。

メソッドの署名
void forward(java.lang.String wid, com.novell.soa.af.impl.soap.T_Action action, com.novell.soa.af.impl.soap.DataItemArray items, java.lang.String comment) 
パラメータ

パラメータ

説明

wid

ワークIDです。

action

行うアクションです(承認、却下、拒否)。

項目

ワークフローが必要とするデータ項目です。

comment

コメントです。

     //
     // Initialize and start a provisioning request
     HashMap provMap = new HashMap();
     provMap.put(Helper.RECIPIENT, recipient);
     provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");
     //
     // Start request
     // Calls method startProvisioningRequest on the provUtils
     // utility object which refers to a utility class that does not
     // ship with the Identity Manager User Application.
     String requestId = provUtils.startProvisioningRequest(provMap, null);
     sleep(5);
     //
    // Get the process id for this running process
    Process process = stub.getProcess(requestId);
    String processId = null;
    if(process != null)
        processId = process.getProcessId(); 
    T_Action action = T_Action.APPROVE;

    T_Logic logic = T_Logic.AND;

    T_WorkEntryOrder workEntryOrder = T_WorkEntryOrder.REQUEST_ID;
    T_WorkEntryQueryChoice [] workEntryqueryChoice =  new T_WorkEntryQueryChoice[3];
    workEntryqueryChoice[0] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[0].setRecipient(recipient);
    workEntryqueryChoice[1] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[1].setRequestId(requestId);
    workEntryqueryChoice[2] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[2].setProcessId(processId);
    //
    // Create work entry query
    T_WorkEntryQuery query = new T_WorkEntryQuery(logic, _workEntryOrder, workEntryqueryChoice);
    //
    // Get all work entries (max records)
    WorkEntryArray workEntryArray = stub.getWorkEntries(query, -1);

    WorkEntry [] workEntry = workEntryArray.getWorkentry();

    if(workEntry != null

    {
         for(int wIndex = 0; wIndex < workEntry.length; wIndex++)
        {
            String workId = workEntry[wIndex].getId();
            //
            //
            LoggerUtils.sendToLogAndConsole("Forwarding : " + workEntry[wIndex].getActivityName() + " work id: " + workId);        
		//
           // Get the dataitem for this item of work
            DataItemArray dataItemArray = stub.getWork(workId);
            DataItem [] dataItem = dataItemArray.getDataitem();
            DataItemArray newDataItemArray = null;
            if(dataItem != null)
                // Call method replicateDataItemArray on the
                // provUtils utility object, which refers to a 
                // utility class that does not ship with the 
                // Identity Manager User Application.
                newDataItemArray = provUtils.replicateDataItemArray(dataItem);
            else
                throw new TestProgramException("DataItem is null.");
            //
            // Claim request for recipient
            String comment = _action.toString() + " this request: " + requestId + " for " + recipient;
            stub.forward(workId, _action, newDataItemArray, comment);
        }

    }

reassignWorkTask

あるユーザから別のユーザにタスクを再割り当てする場合に使用します。

メソッドの署名
void reassignWorkTask(java.lang.String wid, java.lang.String addressee, java.lang.String comment)
パラメータ

パラメータ

説明

wid

タスクのIDです。

addressee

タスクの宛先です。

comment

タスクに関するコメントです。

       //
       // Initialize and start a provisioning request
       HashMap provMap = new HashMap();
       provMap.put(Helper.RECIPIENT, recipient);
       provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");
       //
       // Start request
       // Calls method startProvisioningRequest on the provUtils
       // utility object which refers to a utility class that does not
       // ship with the Identity Manager User Application.
       String requestId = provUtils.startProvisioningRequest(provMap, null);
       sleep(5);
      //
      // Get the process id for this running process
      Process process = stub.getProcess(requestId);
      if(process != null)
      {
            String processId = process.getProcessId();
            String initiator = process.getInitiator();
            //
            // Setup for the query
            HashMap map = new HashMap();
            map.put(Helper.REQUESTID, requestId);
            map.put(Helper.RECIPIENT, recipient);
            map.put(Helper.PROCESSID, processId);
            map.put(Helper.INITIATOR, initiator);
            WorkEntry [] workEntry = workEntryUtils.getWorkEntriesUsingQuery(map, T_WorkEntryOrder.REQUEST_ID, T_Logic.AND);
            if(workEntry == null)                throw new TestProgramException("Work list is empty.");
            //
            // Reassign the work entry from recipient to the addressee
            //
            // Should only be one item
            String reassignComment = null;
            String workId = workEntry[0].getId();
            if(workId != null)
            {
                //
                // Reassign work entry(s) to addressee
                reassignComment = "Reassigning work entry " + workId + " from " + recipient + " to " + addressee;
                stub.reassign(workId, addressee, reassignComment);
                LoggerUtils.sendToLogAndConsole("Reassign work entry " + workId + " from " + recipient + " to " + addressee);
            }
    }

getWork

タスクのID(UUID)により識別されるワークエントリのデータ項目を取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.DataItemArray getWork(java.lang.String workId)
       //
       // Initialize and start a provisioning request
       HashMap provMap = new HashMap();
       provMap.put(Helper.RECIPIENT, recipient);
       provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");
       //
       // Start request
       // Calls method startProvisioningRequest on the provUtils
       // utility object which refers to a utility class that does not
       // ship with the Identity Manager User Application.
       String requestId = provUtils.startProvisioningRequest(provMap, null);
       sleep(5);
       //
       // Get the process id for this running process
      Process process = stub.getProcess(requestId);
      if(process != null)
      {
            String processId = process.getProcessId();
            String initiator = process.getInitiator();
            //
            // Setup for the query
            HashMap map = new HashMap();
            map.put(Helper.REQUESTID, requestId);
            map.put(Helper.RECIPIENT, recipient);
            map.put(Helper.PROCESSID, processId);
            map.put(Helper.INITIATOR, initiator);
            WorkEntry [] workEntry = workEntryUtils.getWorkEntriesUsingQuery(map, T_WorkEntryOrder.REQUEST_ID, T_Logic.AND);
            //
            // Do assertion here
            Assert.assertNotNull("WorkEntry is null for recipient : " + recipient + " with request id : " + requestId, workEntry);
            DataItemArray dataItemArray = stub.getWork(workEntry[0].getId() );
            DataItem [] dataItem = dataItemArray.getDataitem();
            if(dataItem != null)
                LoggerUtils.sendToLogAndConsole(dataItem[0].getName());
      }

forwardWithDigitalSignature

デジタル署名とオプションのデジタル署名プロパティ付きのプロビジョニング要求を転送する場合に使用します。たとえば、管理者がユーザ向きアクティビティの承認、却下、拒否を強制させる場合などに使用します。

メソッドの署名
void forwardWithDigitalSignature(java.lang.String wid, com.novell.soa.af.impl.soap.T_Action action, com.novell.soa.af.impl.soap.DataItemArray items, java.lang.String comment, java.lang.String digitalSignature, com.novell.soa.af.impl.soap.SignaturePropertyArray digitalSignaturePropertyArray) 
パラメータ

パラメータ

説明

wid

ワークIDです。

action

行うアクションです(承認、却下、拒否)。

項目

ワークフローが必要とするデータ項目です。

comment

アクションに関するコメントです。

digitalSignature

デジタル署名です。

digitalSignaturePropertyArray

デジタル署名プロパティマップです。

     //
     // Initialize and start a provisioning request
     HashMap provMap = new HashMap();
     provMap.put(Helper.RECIPIENT, recipient);
     provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");
     //
     // Start request
     // Calls method startProvisioningRequest on the provUtils
     // utility object which refers to a utility class that does not
     // ship with the Identity Manager User Application.
     String requestId = provUtils.startProvisioningRequest(provMap, null);
     sleep(5);
     //
    // Get the process id for this running process
    Process process = stub.getProcess(requestId);
    String processId = null;
    if(process != null)
        processId = process.getProcessId(); 
    T_Action action = T_Action.APPROVE;
    T_Logic logic = T_Logic.AND;

    T_WorkEntryOrder workEntryOrder = T_WorkEntryOrder.REQUEST_ID;
 
 // Get the digital signature string for admin
 String digitalSignature = DigitalSignatureUtils.getDigitalSignatureFromFile(IDigitalSignatureConstants.ADMIN_DIGITAL_SIGNATURE_FILENAME);

    T_WorkEntryQueryChoice [] workEntryqueryChoice =  new T_WorkEntryQueryChoice[3];
    workEntryqueryChoice[0] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[0].setRecipient(recipient);
    workEntryqueryChoice[1] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[1].setRequestId(requestId);
    workEntryqueryChoice[2] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[2].setProcessId(processId);
    //
    // Create work entry query
    T_WorkEntryQuery query = new T_WorkEntryQuery(logic, _workEntryOrder, workEntryqueryChoice);
    //
    // Get all work entries (max records)
    WorkEntryArray workEntryArray = stub.getWorkEntries(query, -1);

    WorkEntry [] workEntry = workEntryArray.getWorkentry();

    if(workEntry != null

    {
         for(int wIndex = 0; wIndex < workEntry.length; wIndex++)
        {
            String workId = workEntry[wIndex].getId();
            //
            //
            LoggerUtils.sendToLogAndConsole("Forwarding : " + workEntry[wIndex].getActivityName() + " work id: " + workId);
            //
            // Get the dataitem for this item of work
            DataItemArray dataItemArray = stub.getWork(workId);
            DataItem [] dataItem = dataItemArray.getDataitem();
            DataItemArray newDataItemArray = null;
            if(dataItem != null)
                  // Call method replicateDataItemArray on the
                  // provUtils utility object, which refers to a 
                  // utility class that does not ship with the 
                  // Identity Manager User Application.
                newDataItemArray = provUtils.replicateDataItemArray(dataItem);
            else
                throw new TestProgramException("DataItem is null.");
            //
            // Claim request for recipient
            String comment = _action.toString() + " this request: " + requestId + " for " + recipient;
            stub.forwardWithDigitalSignature(workId, _action, newDataItemArray, comment, digitalSignature, null);
	}

    }

forwardAsProxy

プロビジョニング要求を転送する場合に使用します。たとえば、管理者がユーザ向きアクティビティの承認、却下、拒否を強制させる場合などに使用します。

メソッドの署名
void forwardAsProxy(java.lang.String wid, com.novell.soa.af.impl.soap.T_Action action, com.novell.soa.af.impl.soap.DataItemArray items, java.lang.String comment, java.lang.String proxyUser) 
パラメータ

パラメータ

説明

wid

ワークID(アクティビティID)です。

action

行うアクションです(承認、却下、拒否)。

項目

ワークフローが必要とするデータ項目です。

comment

アクティビティに追加するコメントです。

proxyUser

代理人ユーザのDNです。

     //
     // Initialize and start a provisioning request
     HashMap provMap = new HashMap();
     provMap.put(Helper.RECIPIENT, recipient);
     provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");
     //
     // Start request
     // Calls method startProvisioningRequest on the provUtils
     // utility object which refers to a utility class that does not  
     // ship with the Identity Manager User Application.
     String requestId = provUtils.startProvisioningRequest(provMap, null);
     sleep(5);
     //
    // Get the process id for this running process
    Process process = stub.getProcess(requestId);
    String processId = null;
    if(process != null)        processId = process.getProcessId(); 
    T_Action action = T_Action.APPROVE;

    T_Logic logic = T_Logic.AND;

    T_WorkEntryOrder workEntryOrder = T_WorkEntryOrder.REQUEST_ID;
 

    T_WorkEntryQueryChoice [] workEntryqueryChoice =  new T_WorkEntryQueryChoice[3];
    workEntryqueryChoice[0] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[0].setRecipient(recipient);
    workEntryqueryChoice[1] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[1].setRequestId(requestId);
    workEntryqueryChoice[2] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[2].setProcessId(processId);
    //
    // Create work entry query
    T_WorkEntryQuery query = new T_WorkEntryQuery(logic, _workEntryOrder, workEntryqueryChoice);
    //
    // Get all work entries (max records)
    WorkEntryArray workEntryArray = stub.getWorkEntries(query, -1);

    WorkEntry [] workEntry = workEntryArray.getWorkentry();

    if(workEntry != null

    {
         for(int wIndex = 0; wIndex < workEntry.length; wIndex++)
        {
            String workId = workEntry[wIndex].getId();
            //
            //
            LoggerUtils.sendToLogAndConsole("Forwarding : " + workEntry[wIndex].getActivityName() + " work id: " + workId);
            //
            // Get the dataitem for this item of work
            DataItemArray dataItemArray = stub.getWork(workId);
            DataItem [] dataItem = dataItemArray.getDataitem();
            DataItemArray newDataItemArray = null;
            if(dataItem != null)
                // Call method replicateDataItemArray on the
                // provUtils utility object, which refers to a 
                // utility class that does not ship with the 
                // Identity Manager User Application.
                newDataItemArray = provUtils.replicateDataItemArray(dataItem);
            else
                throw new TestProgramException("DataItem is null.");
            //
            // Claim request for recipient
            String comment = _action.toString() + " this request: " + requestId + " for " + recipient;
            String proxyUser = ServiceUtils.getInstance().getLoginData().getUsername(LoginData.PROXY_TYPE);
            stub.forwardAsProxy(workId, _action, newDataItemArray, comment, proxyUser);        }

    }

unclaim

プロビジョニング要求のクレーム(引き受け)を解除する場合に使用します。このメソッドは、ユーザアプリケーションで要求が引き受けられた場合にのみ機能します。forward APIメソッド(転送を参照)では、1つの操作で引き受けと転送を行うため、SOAPインタフェースを使って引き受けが転送された場合、要求の引き受けを解除することはできません。

メソッドの署名
void unclaim(java.lang.String wid, java.lang.String comment) 
パラメータ

パラメータ

説明

workId

引き受けを解除するアクティビティのIDです。

comment

アクションに関するコメントです。

    // Action and Approval Types
    final int SELECTED_ACTION = 0; final int CLAIMED_SELECTED_ACTION = 0;
    T_Action [] action = {T_Action.APPROVE, T_Action.REFUSE, T_Action.DENY};
    T_ApprovalStatus [] claimedAction = {T_ApprovalStatus.Approved, T_ApprovalStatus.Retracted, T_ApprovalStatus.Denied};
    //
    // Get the process id for this running process
    Process process = stub.getProcess(requestId);
    String processId = null;
    if(process != null)
        processId = process.getProcessId();

    HashMap map = new HashMap();
    map.put(Helper.REQUESTID, requestId);
    map.put(Helper.RECIPIENT, recipient);
    map.put(Helper.PROCESSID, processId);
    //
    // Claim the request
    WorkEntry workEntry = workEntryUtils.claimWorkEntry(map, action[SELECTED_ACTION]);
    if(workEntry != null)
    {
        //
        // Now unclaim the entry
        String workId = workEntry.getId();
        stub.unclaim(workId, "Unclaiming this work item : " + workId + " for request id : " + requestId);
   }

forwardAsProxyWithDigitalSignature

デジタル署名とデジタル署名プロパティ付きのプロビジョニング要求を転送する場合に使用します。たとえば、管理者がユーザ向きアクティビティの承認、却下、拒否を強制させる場合などに使用します。

メソッドの署名
void forwardAsProxyWithDigitalSignature(java.lang.String wid, com.novell.soa.af.impl.soap.T_Action action, com.novell.soa.af.impl.soap.DataItemArray items, java.lang.String comment, java.lang.String digitalSignature, com.novell.soa.af.impl.soap.SignaturePropertyArray digitalSignaturePropertyArray, java.lang.String proxyUser) 
パラメータ

パラメータ

説明

wid

ワークID(アクティビティID)です。

action

行うアクションです(承認、却下、拒否)。

項目

ワークフローが必要とするデータ項目です。

comment

アクティビティに追加するコメントです。

digitalSignature

デジタル署名です。

digitalSignaturePropertyArray

デジタル署名プロパティマップです。

proxyUser

代理人ユーザのDNです。

     //
     // Initialize and start a provisioning request
     HashMap provMap = new HashMap();
     provMap.put(Helper.RECIPIENT, recipient);
     provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");
     //
     // Start request
     // Calls method startProvisioningRequest on the provUtils
     // utility object which refers to a utility class that does not
     // ship with the Identity Manager User Application.
     String requestId = provUtils.startProvisioningRequest(provMap, null);
     sleep(5);
     //
    // Get the process id for this running process
    Process process = stub.getProcess(requestId);
    String processId = null;
    if(process != null)
        processId = process.getProcessId();
 
    T_Action action = T_Action.APPROVE;

    T_Logic logic = T_Logic.AND;

    T_WorkEntryOrder workEntryOrder = T_WorkEntryOrder.REQUEST_ID; 
    T_WorkEntryQueryChoice [] workEntryqueryChoice =  new T_WorkEntryQueryChoice[3];
    workEntryqueryChoice[0] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[0].setRecipient(recipient);
    workEntryqueryChoice[1] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[1].setRequestId(requestId);
    workEntryqueryChoice[2] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[2].setProcessId(processId);
    //
    // Create work entry query
    T_WorkEntryQuery query = new T_WorkEntryQuery(logic, _workEntryOrder, workEntryqueryChoice);
    //
    // Get all work entries (max records)
    WorkEntryArray workEntryArray = stub.getWorkEntries(query, -1);

    WorkEntry [] workEntry = workEntryArray.getWorkentry();

    if(workEntry != null

    {
         for(int wIndex = 0; wIndex < workEntry.length; wIndex++)
        {
            String workId = workEntry[wIndex].getId();
            //
            //
            LoggerUtils.sendToLogAndConsole("Forwarding : " + workEntry[wIndex].getActivityName() + " work id: " + workId);
            //
            // Get the dataitem for this item of work
            DataItemArray dataItemArray = stub.getWork(workId);
            DataItem [] dataItem = dataItemArray.getDataitem();
            DataItemArray newDataItemArray = null;
            if(dataItem != null)
                // Call method replicateDataItemArray on the
                // provUtils utility object, which refers to a 
                // utility class that does not ship with the 
                // Identity Manager User Application.
                newDataItemArray = provUtils.replicateDataItemArray(dataItem);
            else
                throw new TestProgramException("DataItem is null.");
            //
            // Claim request for recipient
            String comment = _action.toString() + " this request: " + requestId + " for " + recipient;
            String digitalSignature = DigitalSignatureUtils.getDigitalSignatureFromFile(IDigitalSignatureConstants.MMACKENZIE_DIGITAL_SIGNATURE_FILENAME);
            String proxyUser = ServiceUtils.getInstance().getLoginData().getUsername(LoginData.PROXY_TYPE);
 
            stub.forwardAsProxyWithDigitalSignature(workId, _action, newDataItemArray, comment, digitalSignature, null, proxyUser);
        }

    }

reassign

あるユーザから別のユーザにタスクを再割り当てする場合に使用します。

メソッドの署名
void reassign(java.lang.String wid, java.lang.String addressee, java.lang.String comment) 
パラメータ

パラメータ

説明

wid

再割り当てするアクティビティのIDです。

addressee

アクティビティの宛先です。

comment

アクションに関するコメントです。

       //
       // Initialize and start a provisioning request
       HashMap provMap = new HashMap();
       provMap.put(Helper.RECIPIENT, recipient);
       provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");
       //
       // Start request
       // Calls method startProvisioningRequest on the provUtils
       // utility object which refers to a utility class that does not
       // ship with the Identity Manager User Application.
       String requestId = provUtils.startProvisioningRequest(provMap, null);
       sleep(5);
       //
      // Get the process id for this running process
      Process process = stub.getProcess(requestId);
      if(process != null)
      {
            String processId = process.getProcessId();
            String initiator = process.getInitiator();
            //
            // Setup for the query
            HashMap map = new HashMap();
            map.put(Helper.REQUESTID, requestId);
            map.put(Helper.RECIPIENT, recipient);
            map.put(Helper.PROCESSID, processId);
            map.put(Helper.INITIATOR, initiator);
            WorkEntry [] workEntry = workEntryUtils.getWorkEntriesUsingQuery(map, T_WorkEntryOrder.REQUEST_ID, T_Logic.AND);

            if(workEntry == null)
                throw new TestProgramException("Work list is empty.");
            //
            // Reassign the work entry from recipient to the addressee
            //
            // Should only be one work item
            String reassignComment = null;
            String workId = workEntry[0].getId();
            if(workId != null)
            {
                //
                // Reassign work entry(s) to addressee
                reassignComment = "Reassigning work entry " + workId + " from " + recipient + " to " + addressee;
                stub.reassign(workId, addressee, reassignComment);
                LoggerUtils.sendToLogAndConsole("Reassign work entry " + workId + " from " + recipient + " to " + addressee);
            }
    }

getWorkEntries

ワークエントリ(アクティビティ)にクエリして、クエリの条件を満たすWorkEntryオブジェクトのリストを返す場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.WorkEntryArray  getWorkEntries(com.novell.soa.af.impl.soap.T_WorkEntryQuery query, int maxRecords)
パラメータ

パラメータ

説明

クエリー

アクティビティのリストを取得するクエリを指定する場合に使用します。クエリには、次のコンポーネントがあります。

  • choice - 結果をフィルタリングする場合に使用するパラメータです。 複数のパラメータを指定することができます。次のパラメータを使用できます。

    • Addresse - DN、
    • ProcessId、
    • RequestId、
    • ActivityId、
    • Status(整数)、
    • Owner、
    • Priority、
    • CreationTime(YYYY/MM/DD)、
    • ExpTime(YYYY/MM/DD)、
    • CompletionTime(YYYY/MM/DD)、
    • Recipient、
    • Initiator、
    • ProxyFor
  • logic - ANDまたはORです。

  • order - 結果のソート順を指定します。 orderに指定できる値を次に示します。

    • ACTIVITY_ID、
    • RECIPIENT、
    • PROVISIONING_TIME、
    • RESULT_TIME、
    • STATE、
    • STATUS、
    • REQUEST_ID、
    • MESSAGE

maxRecords

取得する最大レコード数を指定する場合に使用します。-1を指定すると、返されるレコード数に制限はありません。

    T_Action action = T_Action.APPROVE;

    T_Logic logic = T_Logic.AND;

    T_WorkEntryOrder workEntryOrder = T_WorkEntryOrder.REQUEST_ID; 
    T_WorkEntryQueryChoice [] workEntryqueryChoice =  new T_WorkEntryQueryChoice[3];
    workEntryqueryChoice[0] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[0].setRecipient(recipient);
    workEntryqueryChoice[1] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[1].setRequestId(requestId);
    workEntryqueryChoice[2] = new T_WorkEntryQueryChoice();
    workEntryqueryChoice[2].setProcessId(processId);
    //
    // Create work entry query
    T_WorkEntryQuery query = new T_WorkEntryQuery(logic, _workEntryOrder, workEntryqueryChoice);
    //
    // Get all work entries (max records)
    WorkEntryArray workEntryArray = stub.getWorkEntries(query, -1);

    WorkEntry [] workEntry = workEntryArray.getWorkentry();

getQuorumForWorkTask

ワークフローアクティビティの定数に関する情報を取得する場合に使用します。このメソッドが機能するためには、ワークフロー設計者によりワークフローアクティビティの定数が実際に指定されていなければなりません。

メソッドの署名
com.novell.soa.af.impl.soap.Quorum getQuorumForWorkTask((java.lang.String workId) 
     //

     // Note: Provisioning resource must contain a quorum in the flow for this api method to work

    //
    // Action and Approval Types
    final int SELECTED_ACTION = 0; final int CLAIMED_SELECTED_ACTION = 0;
    T_Action [] action = {T_Action.APPROVE, T_Action.REFUSE, T_Action.DENY};
    T_ApprovalStatus [] claimedAction = {T_ApprovalStatus.Approved, T_ApprovalStatus.Retracted, T_ApprovalStatus.Denied};
    //
    // Get the process id for this running process
    Process process = stub.getProcess(requestId);
    String processId = null;
    if(process != null)
        processId = process.getProcessId();
    //
    // Setup for the query
    HashMap map = new HashMap();
    map.put(Helper.REQUESTID, requestId);
    map.put(Helper.RECIPIENT, recipient);
    map.put(Helper.PROCESSID, processId);
    map.put(Helper.INITIATOR, process.getInitiator() );
    WorkEntry [] workEntry =
workEntryUtils.getWorkEntriesUsingQuery(map,
T_WorkEntryOrder.REQUEST_ID, T_Logic.AND);
    Assert.assertNotNull("WorkEntry is null for recipient : " +
recipient + " with request id : " + requestId, workEntry);
    //
    //
    String workId = workEntry[0].getId();

    Quorum quorum = stub.getQuorumForWorkTask(workId);

    Assert.assertNotNull("Quorum for work task is null for recipient :
" + recipient + " with request id : " + requestId, quorum);
    //

    // Extract some data  
    int approvalCondition = quorum.getApprovalCondition();
    int status = quorum.getStatus();
    int approveCount = quorum.getApproveCount();
    int participantCount = quorum.getParticipantCount();
    int refuseCount = quorum.getRefuseCount();

resetPriorityForWorkTask

タスクの優先度をリセットする場合に使用します。このメソッドは、承認の分岐が1つのプロビジョニング要求にのみ使用してください。

メソッドの署名
void resetPriorityForWorkTask(java.lang.String workId, int priority, java.lang.String comment) 
パラメータ

パラメータ

説明

workId

アクティビティのIDです。

優先度

アクティビティに設定する優先度です。

comment

アクションに関するコメントです。

// Calls method getProvisioningResourceNameForRecipient 
// on the provUtils utility object, which refers to a utility class 
// that does not ship with the Identity Manager User Application.
String requestNameToStart =
provUtils.getProvisioningResourceNameForRecipient(recipient, "Enable
Active Directory Account");
    Map map = MapUtils.createAndSetMap(new Object[] {
            Helper.RECIPIENT, recipient,
            IProvisioningConstants.PROVISIONING_REQUEST_TO_START,
requestNameToStart});
    //
    // Try and start the provisioning request
     String requestId =
provWrapper.startProvisioningRequest(recipient, requestNameToStart);
    RationalTestScript.sleep(5);
    //
    // Get the process id for this running process
    Process process = stub.getProcess(requestId);
    if(process != null)
    {
        //
        // Setup for the query
        HashMap map = new HashMap();
        map.put(Helper.REQUESTID, requestId);
        map.put(Helper.RECIPIENT, recipient);
        map.put(Helper.PROCESSID, process.getProcessId());
        map.put(Helper.INITIATOR, process.getInitiator());
        WorkEntry [] workEntry =
workEntryUtils.getWorkEntriesUsingQuery(map,
T_WorkEntryOrder.REQUEST_ID, T_Logic.AND);
        //
        // Now reset the priority for this work item.
        String workId = workEntry[0].getId();
        String comment = "Resetting priority for this work item.";
        int priority = 0;
        stub.resetPriorityForWorkTask(workId, priority, comment);
}

20.3.4 コメント

この節は、各コメントメソッドに関する参照情報を取り上げています。コメントメソッドには次のものが含まれています。

getCommentsByType

特定のタイプ(ユーザ、システムなど)のワークフローコメントを取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.CommentArray getCommentsByType(java.lang.String requestId, com.novell.soa.af.impl.soap.T_CommentType type) 
パラメータ

パラメータ

説明

requestId

プロセスIDです。

type

コメントタイプ(USERまたはSYSTEM)です。

       //
       // Initialize and start a provisioning request
       HashMap provMap = new HashMap();
       provMap.put(Helper.RECIPIENT, recipient);
       provMap.put(I"Provisioning_Request_To_Start_Key", "Enable
Active Directory Account (Mgr Approve-No Timeout)");
       //
       // Start request
       // Calls method startProvisioningRequest on the provUtils
       // utility object which refers to a utility class that does not
       // ship with the Identity Manager User Application.
       String requestId = provUtils.startProvisioningRequest(provMap,
null);
      sleep(5);
      //
      // Get the comments by type : either User or System
      T_CommentType [] commentTypes = {T_CommentType.User,
T_CommentType.System};

     for(int types = 0; types < commentTypes.length; types++)
    {
        CommentArray commentArray = stub.getCommentsByType(requestId,
commentTypes[types]);
        Comment [] comments = commentArray.getComment();
        if(comments != null)
        {
            for(int index = 0; index < comments.length; index++)
            {
                LoggerUtils.sendToLogAndConsole(" \nComment Type = " +
commentTypes[types].getValue() + "\n" +
                            "Activity Id: " +
comments[index].getActivityId() + "\n" +
                            "Comment : " + comments[index].getComment()
+ "\n" +
                            "User : " + comments[index].getUser() + "\n"
+
                            "System comment : " +
comments[index].getSystemComment() + "\n" +
                            "Time stamp : " +
comments[index].getTimestamp().getTime().toString() );
           }
        }
    }

getCommentsByActivity

特定のアクティビティのコメントを取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.CommentArray getCommentsByActivity(java.lang.String requestId, java.lang.String aid) 
パラメータ

パラメータ

説明

requestId

プロセスIDです。

aid

アクティビティIDです。

       //
       // Initialize and start a provisioning request
       HashMap provMap = new HashMap();
       provMap.put(Helper.RECIPIENT, recipient);
       provMap.put(I"Provisioning_Request_To_Start_Key", "Enable
Active Directory Account (Mgr Approve-No Timeout)");
       //
       // Start request
       // Calls method startProvisioningRequest on the provUtils
       // utility object which refers to a utility class that does not
       // ship with the Identity Manager User Application.
       String requestId = provUtils.startProvisioningRequest(provMap,
null);
      sleep(5);
      //
      // Get the process id for this running process
      Process process = stub.getProcess(requestId);
      if(process != null)
      {
            String processId = process.getProcessId();
            String initiator = process.getInitiator();
            //
            // Setup for the query
            HashMap map = new HashMap();
            map.put(Helper.REQUESTID, requestId);
            map.put(Helper.RECIPIENT, recipient);
            map.put(Helper.PROCESSID, processId);
            map.put(Helper.INITIATOR, initiator);
            WorkEntry [] workEntry =
workEntryUtils.getWorkEntriesUsingQuery(map,
T_WorkEntryOrder.REQUEST_ID, T_Logic.AND);
            //
            // Get the activity id associated with the item of work
            String activityId = workEntry[0].getActivityId();
            //
            // Get the comments based on activity
            if(activityId != null)
            {
                CommentArray commentArray =
stub.getCommentsByActivity(requestId, activityId);
                Comment [] comments = commentArray.getComment();
            }

    }

getCommentsByUser

特定のユーザが行ったコメントを取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.CommentArray getCommentsByUser(java.lang.String requestId, java.lang.String user)
パラメータ

パラメータ

説明

requestId

プロセスIDです。

user

コメントを作成したユーザ(受信者)のDNです。

       //
       // Initialize and start a provisioning request
       HashMap provMap = new HashMap();
       provMap.put(Helper.RECIPIENT, recipient);
       provMap.put(I"Provisioning_Request_To_Start_Key", "Enable
Active Directory Account (Mgr Approve-No Timeout)");
       //
       // Start request
       // Calls method startProvisioningRequest on the provUtils
       // utility object which refers to a utility class that does not
       // ship with the Identity Manager User Application.
       String requestId = provUtils.startProvisioningRequest(provMap,\
null);
      sleep(5);
     //
      // Get the comments by recipient (should be the same as user)
      CommentArray commentArray = stub.getCommentsByUser(requestId,
recipient);
      Comment [] comments = commentArray.getComment();

getCommentsByCreationTime

特定の時刻に行われたコメントを取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.CommentArray getCommentsByCreationTime(java.lang.String requestId, long time, com.novell.soa.af.impl.soap.T_Operator op) 
パラメータ

パラメータ

説明

requestId

プロセスIDです。

タイム

タイムスタンプです。

op

使用するクエリ演算子です。次の演算子を使用できます。

  • EQ - 等しい
  • LT - 未満
  • LE - 以下
  • GT - より大きい
  • GE - 以上
       //
       // Initialize and start a provisioning request
       HashMap provMap = new HashMap();
       provMap.put(Helper.RECIPIENT, recipient);
       provMap.put(I"Provisioning_Request_To_Start_Key", "Enable
Active Directory Account (Mgr Approve-No Timeout)");
       //
       // Start request
       // Calls method startProvisioningRequest on the provUtils
       // utility object which refers to a utility class that does not
       // ship with the Identity Manager User Application.
       String requestId = provUtils.startProvisioningRequest(provMap,
null);
      sleep(5);
      //
      // Get comments by creation time for the provisioning request
started above.
      long currentTime = System.currentTimeMillis();
      LoggerUtils.sendToLogAndConsole("-->Current date = " + new
java.util.Date(currentTime).toString() );
      //
      //
      T_Operator operator = T_Operator.GT;
      CommentArray commentArray =
stub.getCommentsByCreationTime(requestId, currentTime, operator);
      Comment [] comments = commentArray.getComment(); 

addComment

ワークフローアクティビティにコメントを追加する場合に使用します。

メソッドの署名
void addComment(java.lang.String workId, java.lang.String comment)
パラメータ

パラメータ

説明

workId

アクティビティID(UUID)です。

comment

アクティビティに関するコメントです。

       //       // Initialize and start a provisioning request       HashMap provMap = new HashMap();       provMap.put(Helper.RECIPIENT, recipient);       provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active Directory Account (Mgr Approve-No Timeout)");       //       // Start request
       // Calls method startProvisioningRequest on the provUtils       // utility object which refers to a utility class that does not       // ship with the Identity Manager User Application.
       String requestId = provUtils.startProvisioningRequest(provMap, null);      sleep(5);      //      // Setup for the query      HashMap map = new HashMap();      map.put(Helper.REQUESTID, requestId);      map.put(Helper.RECIPIENT, recipient);      WorkEntry [] workEntry = workEntryUtils.getWorkEntriesUsingQuery(map, T_WorkEntryOrder.REQUEST_ID, T_Logic.AND);      //      // Add comment to the work entry      String workId = workEntry[0].getId();      String processId = workEntry[0].getProcessId();      String addComment = "Test comment for work id " + workId;      stub.addComment(workId, addComment);      sleep(2);

getComments

ワークフローからコメントを取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.CommentArray getComments(java.lang.String workId, int maxRecords) 
パラメータ

パラメータ

説明

workId

アクティビティID(UUID)です。

maxRecords

取得する最大レコード数を指定する整数です。

      //
      // Setup for the query
      HashMap map = new HashMap();
      map.put(Helper.RECIPIENT, addressee);
      WorkEntry [] workEntry =
workEntryUtils.getWorkEntriesUsingQuery(map,
T_WorkEntryOrder.ADDRESSEE, T_Logic.OR);
      //
      // Get all the comment records for this workId
      int maxRecords = -1;
      CommentArray commentArray = stub.getComments(workId, maxRecords);
      Comment [] comment = commentArray.getComment();

20.3.5 設定

この節は、各環境設定メソッドに関する参照情報を取り上げています。環境設定メソッドには次のものが含まれています。

setCompletedProcessTimeout

完了したプロセスのタイムアウトを設定する場合に使用します。タイムアウトに指定した日数より前に完了したプロセスは、システムから削除されます。デフォルトは120日です。0~365日の値を指定できます。

メソッドの署名
void setCompletedProcessTimeout(int time) 
accessConfigurationSettings(SET_COMPLETED_PROCESS_TIMEOUT, new Integer(212) );

setEngineConfiguration

ワークフローエンジン環境設定パラメータを設定する場合に使用します。

メソッドの署名
void  setEngineConfiguration(com.novell.soa.af.impl.soap.Configuration config) 
パラメータ

パラメータ

説明

minPoolSize

最小スレッドプールサイズです。

maxnPoolSize

最大スレッドプールサイズです。

initialPoolSize

初期スレッドプールサイズです。

keepAliveTime

スレッドプールの有効時間です。

pendingInterval

クラスタ同期時刻です。

cleanupInterval

データベースからプロセスをパージする間隔です。

retryQueueInterval

失敗したプロセスを再試行する間隔です。

maxShutdownTime

エンジンをシャットダウンする前に、スレッドを完了させるために待機する最大時間です。

userActivityTimeout

デフォルトのユーザアクティビティタイムアウト時間です。

completedProcessTimeout

デフォルトの完了プロセスタイムアウトです。

webServiceActivityTimeout

デフォルトのWebサービスアクティビティタイムアウトです。

emailNotification

電子メール通知をオンまたはオフにします。

processCacheInitialCapacity

プロセスキャッシュ初期容量です。

processCacheMaxCapacity

プロセスキャッシュ最大容量です。

processCacheLoadFactor

プロセスキャッシュロードファクタです。

heartbeatInterval

ハートビート間隔です。

heartbeatFactor

ハートビートファクタです。

accessConfigurationSettings(SET_ENGINE_CONFIGURATION, new Integer(313) );

getCompletedProcessTimeout

完了したプロセスのタイムアウトを取得する場合に使用します。

メソッドの署名
int getCompletedProcessTimeout()
accessConfigurationSettings(GET_COMPLETED_PROCESS_TIMEOUT, new Integer(121) );

setEmailNotifications

電子メール通知をグローバルに有効/無効にする場合に使用します。

メソッドの署名
void setEmailNotifications(boolean enable)
パラメータ

パラメータ

説明

有効

trueの場合、電子メール通知が有効になります。そうでない場合は、無効になります。

accessConfigurationSettings(SET_EMAIL_NOTIFICATIONS, new Boolean(false) );

clearNIMCaches

Novell Integration Manager(以前のexteNd Composer)キャッシュを消去します。

メソッドの署名
void clearNIMCaches()
accessConfigurationSettings(CLEAR_NIM_CACHES, new Object() );

setWebServiceActivityTimeout

Webサービスアクティビティのタイムアウトを設定する場合に使用します。デフォルト値は50分です。1分から7日までの範囲の値を指定できます。

メソッドの署名
void setWebServiceActivityTimeout(int time)
パラメータ

パラメータ

説明

タイム

タイムアウト値(分)です。

accessConfigurationSettings(SET_WEBSERVICE_ACTIVITY_TIMEOUT, new Integer(767) );

getUserActivityTimeout

ユーザ向きアクティビティのタイムアウトを取得する場合に使用します。

メソッドの署名
int getUserActivityTimeout()
accessConfigurationSettings(GET_USER_ACTIVITY_TIMEOUT, new Integer(3767) );

getEmailNotifications

グローバル電子メール通知が有効か、または無効かを判断する場合に使用します。

メソッドの署名
boolean getEmailNotifications() 
accessConfigurationSettings(GET_EMAIL_NOTIFICATIONS, new Boolean(true) );

setUserActivityTimeout

ユーザ向きアクティビティのタイムアウトを設定する場合に使用します。デフォルトではタイムアウトはありません(ゼロ)。1時間から365日までの範囲の値を指定できます。

メソッドの署名
void setUserActivityTimeout(int time)
パラメータ

パラメータ

説明

タイム

タイムアウト値(時間)です。

accessConfigurationSettings(SET_USER_ACTIVITY_TIMEOUT, new Integer(1767) );

getEngineConfiguration

ワークフローエンジン環境設定パラメータを取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.Configuration getEngineConfiguration()
accessConfigurationSettings(GET_ENGINE_CONFIGURATION, new Integer(141) );

getWebServiceActivityTimeout

Webサービスアクティビティのタイムアウトを取得する場合に使用します。

メソッドの署名
int getWebServiceActivityTimeout()
accessConfigurationSettings(GET_WEBSERVICE_ACTIVITY_TIMEOUT, new Integer(808) );

20.3.6 その他

この節は、その他のメソッドに関する参照情報を取り上げています。その他のメソッドには次のものが含まれています。

getGraph

ワークフローのJPGイメージを取得する場合に使用します。アプリケーションサーバとIDMユーザアプリケーションが動作するコンピュータには、Graphvizプログラムをインストールしておく必要があります。 Graphvizの詳細は、「Graphviz」を参照してください。

メソッドの署名
byte[] getGraph(java.lang.String processId)
パラメータ

パラメータ

説明

processId

要求IDです。

 //
     // Initialize and start a provisioning request
     HashMap provMap = new HashMap();
     provMap.put(Helper.RECIPIENT, recipient);
     provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active
Directory Account (Mgr Approve-No Timeout)");
     //
     // Start request
     // Calls method startProvisioningRequest on the provUtils
     // utility object which refers to a utility class that does not
     // ship with the Identity Manager User Application.
     String requestId = provUtils.startProvisioningRequest(provMap,
null);
     sleep(5);
     //

     //
     Process process = stub.getProcess(requestId);
     if(process != null)
    {
        byte [] graph = null;
        if( (recipient.compareTo(process.getRecipient()) == 0) &&
(requestId.compareTo(process.getRequestId()) == 0) )
        {
            graph = stub.getGraph(process.getProcessId() );
        }
        //
        // Do assert
        Assert.assertNotNull("Graph is null.", graph);
    }

getFlowDefinition

プロビジョニング要求のXMLを取得する場合に使用します。

メソッドの署名
java.lang.String getFlowDefinition(java.lang.String processId) 
パラメータ

パラメータ

説明

processId

要求IDです。

 //
     // Initialize and start a provisioning request
     HashMap provMap = new HashMap();
     provMap.put(Helper.RECIPIENT, recipient);
     provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active
Directory Account (Mgr Approve-No Timeout)");
     //
     // Start request
     // Calls method startProvisioningRequest on the provUtils
     // utility object which refers to a utility class that does not
     // ship with the Identity Manager User Application.
     String requestId = provUtils.startProvisioningRequest(provMap, null);
     sleep(5);
     //

     //

     Process process = stub.getProcess(requestId);
     if(process != null)
    {
        String XMLFlowDefinition = null;
        if( (recipient.compareTo(process.getRecipient()) == 0) &&
(requestId.compareTo(process.getRequestId()) == 0) )
        {
            XMLFlowDefinition = stub.getFlowDefinition(process.getProcessId() );
        }
        //
        // Do assert
        Assert.assertNotNull("Flow Definition is null.", XMLFlowDefinition);
    }

getFormDefinition

プロビジョニング要求のフォームのXMLを取得する場合に使用します。

メソッドの署名
java.lang.String getFormDefinition(java.lang.String processId)
パラメータ

パラメータ

説明

processId

要求IDです。

 //
     // Initialize and start a provisioning request
     HashMap provMap = new HashMap();
     provMap.put(Helper.RECIPIENT, recipient);
     provMap.put(I"Provisioning_Request_To_Start_Key", "Enable Active
Directory Account (Mgr Approve-No Timeout)");
     //
     // Start request
     // Calls method startProvisioningRequest on the provUtils
     // utility object which refers to a utility class that does not
     // ship with the Identity Manager User Application.
     String requestId = provUtils.startProvisioningRequest(provMap, null);
     sleep(5);
     //

     //

     Process process = stub.getProcess(requestId);
     if(process != null)
    {

         String XMLFormDefinition = null;
         if( (recipient.compareTo(process.getRecipient()) == 0) &&
(requestId.compareTo(process.getRequestId()) == 0) )
        {
            XMLFormDefinition =
stub.getFormDefinition(process.getProcessId() );
        }
        //
        // Do assert
        Assert.assertNotNull("Form Definition is null.",
XMLFormDefinition);
    }

getVersion

ワークフローシステムのバージョンを取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.T_Version getVersion()
 StringBuffer result = new StringBuffer();

     T_Version version = stub.getVersion();
     if (version != null)
    {
        result.append(" Major = " + version.getMajor() );
        result.append(" Minor = " + version.getMinor() );
        result.append(" Revision = " + version.getRevision() );

        System.out.println("Version Information " + result.toString());
    }

20.3.7 クラスタ

この節は、各クラスタメソッドに関する参照情報を取り上げています。クラスタメソッドには次のものが含まれています。

getEngineState

エンジンIDで指定された、ワークフローエンジンのIEngineStateを取得する場合に使用します。

メソッドの署名
com.novell.soa.af.impl.soap.EngineState getEngineState(java.lang.String engineId)
パラメータ

パラメータ

説明

engineId

ワークフローエンジンのIDです。

 EngineStateArray engineStateArray = stub.getClusterState();
    EngineState [] engineState = engineStateArray.getEngineStates();
    if(engineState != null)
    {
        LoggerUtils.sendToLogAndConsole("EngineCount in cluster:" +
engineState.length);
        for(int index = 0; index < engineState.length; index++)
        {
            EngineState engine =
stub.getEngineState(engineState[index].getEngineId() );
            LoggerUtils.sendToLogAndConsole(
                "Engine Id: " + engine.getEngineId() + "\n" +
                "Engine status: " + engine.getEngineStatus() + "\n" +
                "Value of engine status: " +
engine.getValueOfEngineStatus() + "\n" +
                "Heartbeat: " + ( (engine.getHeartbeat() != null) ?
engine.getHeartbeat().getTime().toString() : "null") + "\n" +
                "Shutdown time: " + ((engine.getShutdownTime()!= null)
? engine.getShutdownTime().getTime().toString() : "null") + "\n" +
                "Start time: " + ((engine.getStartTime() != null) ?
engine.getStartTime().getTime().toString() : "null") );
        }
    } 

reassignAllProcesses

ソースエンジンのすべてのプロセスを、ターゲットエンジンのリストに再割り当てする場合に使用します。

メソッドの署名
int reassignAllProcesses(java.lang.String sourceEngineId, com.novell.soa.af.impl.soap.StringArray targetEngineIds) 
パラメータ

パラメータ

説明

sourceEngineId

ソースワークフローエンジンのIDです。

targetEngineIds

ターゲットワークフローエンジンのIDです。

getEngineState

クラスタ内の各エンジンに対して、IEngineStateオブジェクトを含むリストを取得する場合に使用します。

メソッドの署名
public com.novell.soa.af.impl.soap.EngineState getEngineState(java.lang.String engineId)
パラメータ

パラメータ

説明

engineId

ワークフローエンジンのIDです。

 EngineStateArray engineStateArray = stub.getClusterState();
    EngineState [] engineState = engineStateArray.getEngineStates();
    if(engineState != null)
    {
        LoggerUtils.sendToLogAndConsole("EngineCount in cluster:" +
engineState.length);
        for(int index = 0; index < engineState.length; index++)
        {
            EngineState engine =
stub.getEngineState(engineState[index].getEngineId() );
            LoggerUtils.sendToLogAndConsole(
                "Engine Id: " + engine.getEngineId() + "\n" +
                "Engine status: " + engine.getEngineStatus() + "\n" +
                "Value of engine status: " +
engine.getValueOfEngineStatus() + "\n" +
                "Heartbeat: " + ( (engine.getHeartbeat() != null) ?
engine.getHeartbeat().getTime().toString() : "null") + "\n" +
                "Shutdown time: " + ((engine.getShutdownTime()!= null)
? engine.getShutdownTime().getTime().toString() : "null") + "\n" +
                "Start time: " + ((engine.getStartTime() != null) ?
engine.getStartTime().getTime().toString() : "null") );
        }
    } 

reassignPercentageProcesses

ソースエンジンからターゲットエンジンに、パーセンテージを指定してプロセスを再割り当てする場合に使用します。

メソッドの署名
int reassignPercentageProcesses(int percent, java.lang.String sourceEngineId, java.lang.String targetEngineId)
パラメータ

パラメータ

説明

percent

再割り当てするプロセスの割合(パーセント)を表す整数です。

sourceEngineId

ソースワークフローエンジンのIDです。

targetEngineIds

ターゲットワークフローエンジンのIDです。

reassignProcesses

ソースエンジンからターゲットエンジンに、1つまたは複数のプロセスを再割り当てする場合に使用します。

メソッドの署名
int reassignProcesses(com.novell.soa.af.impl.soap.StringArray requestIds, java.lang.String sourceEngineId, java.lang.String targetEngineId)
パラメータ

パラメータ

説明

requestIds

再割り当てするプロセスの要求ID(requestIds )のリストです。

sourceEngineId

ソースワークフローエンジンのIDです。

targetEngineIds

ターゲットワークフローエンジンのIDです。

removeEngine

クラスタ状態テーブルからエンジンを作成する場合に使用します。エンジンの状態はSHUTDOWNまたはTIMEDOUTでなければなりません。

メソッドの署名
void removeEngine(java.lang.String engineId)
パラメータ

パラメータ

説明

engineId

削除するワークフローエンジンのIDです。