protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'name' => 'string', 'type' => 'string', 'value' => '', 'readable' => 'boolean', 'writable' => 'boolean', 'required' => 'boolean', 'datePattern' => '', 'enumValues' => 'array<ActivitiGetFormDataResponseDataFormPropertyEnumValue>'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'activityId' => 'string', 'activityName' => 'string', 'activityType' => 'string', 'processDefinitionId' => 'string', 'processDefinitionUrl' => 'string', 'processInstanceId' => 'string', 'processInstanceUrl' => 'string', 'executionId' => 'string', 'taskId' => 'string', 'calledProcessInstanceId' => '', 'assignee' => 'string', 'startTime' => 'string', 'endTime' => 'string', 'durationInMillis' => 'int', 'tenantId' => ''));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'processInstanceUrl' => 'string', 'message' => 'string', 'author' => 'string', 'time' => 'string', 'processInstanceId' => 'string'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('name' => 'string', 'key' => 'string', 'category' => 'string', 'version' => 'int', 'metaInfo' => 'string', 'deploymentId' => 'string', 'id' => 'string', 'url' => 'string', 'createTime' => 'string', 'lastUpdateTime' => 'string', 'deploymentUrl' => 'string', 'tenantId' => ''));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('type' => 'string', 'userId' => 'string', 'groupId' => '', 'taskId' => 'string', 'taskUrl' => 'string', 'processInstanceId' => '', 'processInstanceUrl' => ''));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('gonzo' => 'string'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'url' => 'string', 'processInstanceId' => 'string', 'processInstanceUrl' => 'string', 'processDefinitionId' => 'string', 'processDefinitionUrl' => 'string', 'executionId' => 'string', 'executionUrl' => 'string', 'retries' => 'int', 'exceptionMessage' => 'string', 'dueDate' => 'string', 'tenantId' => ''));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'processDefinitionId' => 'string', 'processDefinitionUrl' => 'string', 'processInstanceId' => 'string', 'processInstanceUrl' => 'string', 'executionId' => 'string', 'name' => 'string', 'description' => 'string', 'deleteReason' => '', 'owner' => 'string', 'assignee' => 'string', 'startTime' => 'string', 'endTime' => 'string', 'durationInMillis' => 'int', 'workTimeInMillis' => 'int', 'claimTime' => 'string', 'taskDefinitionKey' => 'string', 'formKey' => '', 'priority' => 'int', 'dueDate' => 'string', 'parentTaskId' => '', 'url' => 'string', 'variables' => '', 'tenantId' => ''));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('name' => 'string', 'url' => 'string', 'count' => 'int'));
 }
Beispiel #10
0
 public function parseResponse($url, $response, $returnType, $isArray, $expectedHttpCodes, $errorHttpCodes)
 {
     // parse response
     $header = false;
     $content = array();
     $status = null;
     foreach (explode("\r\n", $response) as $line) {
         if (strpos($line, 'HTTP/1.1') === 0) {
             $lineParts = explode(' ', $line);
             $status = intval($lineParts[1]);
             $header = true;
         } else {
             if ($line == '') {
                 $header = false;
             } else {
                 if ($header) {
                     $line = explode(': ', $line);
                     switch ($line[0]) {
                         case 'Status':
                             $status = intval(substr($line[1], 0, 3));
                             break;
                     }
                 } else {
                     $content[] = $line;
                 }
             }
         }
     }
     if (is_null($status)) {
         throw new ActivitiClientException("No valid response accepted, URL [{$url}]", ActivitiClientException::NO_VALID_RESPONSE);
     }
     if (in_array($status, $expectedHttpCodes)) {
         $response = implode("\r\n", $content);
         if (!trim($response)) {
             return;
         }
         if ($returnType == 'string') {
             return $response;
         }
         $response = json_decode($response);
         if ($returnType) {
             if ($isArray) {
                 return ActivitiResponseObject::fromArray($response, $returnType);
             }
             return new $returnType($response);
         }
         return;
     }
     if ($response && json_decode(implode("\n", $content))) {
         $error = json_decode(implode("\n", $content));
         if (isset($error->statusCode) && isset($error->errorMessage)) {
             throw new ActivitiClientException("Status [{$error->statusCode}], URL [{$url}]: {$error->errorMessage}", ActivitiClientException::INVALID_HTTP_CODE);
         }
     }
     if (isset($errorHttpCodes[$status])) {
         throw new ActivitiClientException("Status [{$status}], URL [{$url}]: " . $errorHttpCodes[$status], ActivitiClientException::INVALID_HTTP_CODE);
     }
     if (ActivitiResponseType::isExpectedCode($status)) {
         throw new ActivitiClientException("Status [{$status}], URL [{$url}]: " . ActivitiResponseType::getCodeDescription($status), ActivitiClientException::INVALID_HTTP_CODE);
     }
     throw new ActivitiClientException("Unexpected status [{$status}], URL [{$url}]", ActivitiClientException::INVALID_HTTP_CODE);
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'url' => 'string', 'version' => 'int', 'key' => 'string', 'category' => 'string', 'suspended' => 'boolean', 'name' => 'string', 'description' => 'string', 'deploymentId' => 'string', 'deploymentUrl' => 'string', 'graphicalNotationDefined' => 'boolean', 'resource' => 'string', 'diagramResource' => 'string', 'startFormDefined' => 'boolean'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('iD_' => 'string', 'tYPE_' => 'string'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'url' => 'string', 'businessKey' => 'string', 'suspended' => 'boolean', 'processDefinitionUrl' => 'string', 'activityId' => 'string', 'tenantId' => ''));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'processInstanceId' => 'string', 'processInstanceUrl' => 'string', 'executionId' => 'string', 'activityInstanceId' => 'string', 'taskId' => 'string', 'taskUrl' => 'string', 'time' => 'string', 'detailType' => 'string', 'revision' => 'int', 'variable' => '', 'propertyId' => '', 'propertyValue' => ''));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'name' => 'string', 'deploymentTime' => 'string', 'category' => 'string', 'url' => 'string', 'tenantId' => ''));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'url' => 'string', 'email' => 'string'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('userTaskForManager' => 'string'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('data' => 'array<ActivitiQueryForHistoricProcessInstancesResponseData>', 'total' => 'int', 'start' => 'int', 'sort' => 'string', 'order' => 'string', 'size' => 'int'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('action' => 'string', 'id' => 'string', 'message' => 'array<ActivitiGetAllEventsForTaskResponseMessage>', 'taskUrl' => 'string', 'time' => 'string', 'url' => 'string', 'userId' => ''));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'businessKey' => 'string', 'processDefinitionId' => 'string', 'processDefinitionUrl' => 'string', 'startTime' => 'string', 'endTime' => 'string', 'durationInMillis' => 'int', 'startUserId' => 'string', 'startActivityId' => 'string', 'endActivityId' => 'string', 'deleteReason' => '', 'superProcessInstanceId' => 'string', 'url' => 'string', 'variables' => '', 'tenantId' => ''));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('name' => 'string', 'variableScope' => 'string', 'value' => 'string'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'url' => 'string', 'parentId' => '', 'parentUrl' => '', 'processInstanceId' => 'string', 'processInstanceUrl' => 'string', 'suspended' => 'boolean', 'activityId' => '', 'tenantId' => ''));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('data' => 'array<ActivitiListOfTasksResponseData>', 'total' => 'int', 'start' => 'int', 'sort' => 'string', 'order' => 'string', 'size' => 'int'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'url' => 'string', 'name' => 'string', 'description' => 'string', 'type' => 'string', 'taskUrl' => 'string', 'processInstanceUrl' => '', 'externalUrl' => '', 'contentUrl' => 'string'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'processInstanceId' => 'string', 'processInstanceUrl' => 'string', 'taskId' => 'string', 'variable' => ''));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('tableName' => 'string', 'columnNames' => 'array<ActivitiGetColumnInfoForSingleTableResponseColumnName>', 'columnTypes' => 'array<ActivitiGetColumnInfoForSingleTableResponseColumnType>'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('assignee' => 'string', 'createTime' => 'string', 'delegationState' => 'string', 'description' => 'string', 'dueDate' => 'string', 'execution' => 'string', 'id' => 'string', 'name' => 'string', 'owner' => 'string', 'parentTask' => 'string', 'priority' => 'int', 'processDefinition' => 'string', 'processInstance' => 'string', 'suspended' => 'boolean', 'taskDefinitionKey' => 'string', 'url' => 'string', 'tenantId' => ''));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => 'string', 'url' => 'string', 'name' => 'string', 'type' => 'string'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('url' => 'string', 'user' => 'string', 'group' => '', 'type' => 'string'));
 }
 protected function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('formKey' => '', 'deploymentId' => 'string', 'processDefinitionId' => 'string', 'processDefinitionUrl' => 'string', 'taskId' => 'string', 'taskUrl' => 'string', 'formProperties' => 'array<ActivitiGetFormDataResponseDataFormProperty>'));
 }