コード例 #1
0
 /**
  * @return array
  */
 public function convertToArray()
 {
     if ($this->isEmpty) {
         return array();
     }
     return array(static::INDEX_SCHEDULE_ACTIVITY_TASK_DECISION_ATTRIBUTE => array_merge($this->activityType->convertToArray(), $this->taskList->convertToArray(), array(static::INDEX_TASK_PRIORITY => $this->taskPriority, static::INDEX_HEARTBEAT_TIMEOUT => $this->heartbeatTimeout, static::INDEX_INPUT => $this->input, static::INDEX_SCHEDULE_TO_CLOSE_TIMEOUT => $this->scheduleToCloseTimeout, static::INDEX_SCHEDULE_TO_START_TIMEOUT => $this->scheduleToStartTimeout, static::INDEX_ACTIVITY_ID => $this->activityId, static::INDEX_CONTROL => $this->control, static::INDEX_START_TO_CLOSE_TIMEOUT => $this->startToCloseTimeout)));
 }
コード例 #2
0
 /**
  * @return array
  */
 public function convertToArray()
 {
     if ($this->isEmpty) {
         return array();
     }
     return array(static::INDEX_ACTIVITY_TASK_SCHEDULED_EVENT_ATTRIBUTES => array_merge(array(static::INDEX_ACTIVITY_ID => $this->activityId, static::INDEX_DECISION_TASK_COMPLETED_EVENT_ID => $this->decisionTaskCompletedEventId, static::INDEX_INPUT => $this->input, static::INDEX_TASK_PRIORITY => $this->taskPriority, static::INDEX_HEARTBEAT_TIMEOUT => $this->heartbeatTimeout, static::INDEX_SCHEDULE_TO_CLOSE_TIMEOUT => $this->scheduleToCloseTimeout, static::INDEX_SCHEDULE_TO_START_TIMEOUT => $this->scheduleToStartTimeout, static::INDEX_START_TO_CLOSE_TIMEOUT => $this->startToCloseTimeout), $this->activityType->convertToArray(), $this->taskList->convertToArray()));
 }
コード例 #3
0
 public function initFromArrayDataProvider()
 {
     $request = json_decode($this->loadFixture(static::FILE_FIXTURE_REQUEST), true);
     $source = $request[ScheduleActivityTaskDecisionAttributes::INDEX_SCHEDULE_ACTIVITY_TASK_DECISION_ATTRIBUTE];
     $expectation = new ScheduleActivityTaskDecisionAttributes();
     $expectation->setActivityId('verification-27');
     $activityType = new ActivityType();
     $activityType->initFromArray($source);
     $expectation->setActivityType($activityType);
     $expectation->setControl('digital music');
     $expectation->setHeartbeatTimeout('120');
     $expectation->setInput('5634-0056-4367-0923,12/12,437');
     $expectation->setScheduleToCloseTimeout('900');
     $expectation->setScheduleToStartTimeout('300');
     $expectation->setStartToCloseTimeout('600');
     $taskList = new TaskList();
     $taskList->initFromArray($source);
     $expectation->setTaskList($taskList);
     $expectation->setTaskPriority('100');
     $expectation->setIsEmpty(false);
     return array(array('success' => array(static::INDEX_INPUT => $request, static::INDEX_EXPECTATION => $expectation)));
 }
コード例 #4
0
 public function initFromArrayDataProvider()
 {
     $testData = json_decode($this->loadFixture(static::FILE_FIXTURE), true);
     $expectation = new ActivityTaskScheduledEventAttributes();
     $taskList = new TaskList();
     $taskList->setName('pocTasklist');
     $expectation->setTaskList($taskList);
     $expectation->setActivityId('562f5893e3684');
     $activityType = new ActivityType();
     $activityType->setName('convert2Pdf');
     $activityType->setVersion('1.0');
     $expectation->setActivityType($activityType);
     $expectation->setDecisionTaskCompletedEventId(4);
     $expectation->setHeartbeatTimeout('120');
     $expectation->setInput('abc');
     $expectation->setScheduleToCloseTimeout('120');
     $expectation->setScheduleToStartTimeout('120');
     $expectation->setTaskPriority(1);
     $expectation->setStartToCloseTimeout('120');
     $expectation->setIsEmpty(false);
     return array(array('success' => array(static::INDEX_INPUT => $testData, static::INDEX_EXPECTATION => $expectation)));
 }
コード例 #5
0
ファイル: ActivityTask.php プロジェクト: evilfirefox/swf-w
 public function convertToArray()
 {
     $result = array_merge(array(static::INDEX_ACTIVITY_ID => $this->activityId, static::INDEX_INPUT => $this->input), $this->activityType->convertToArray());
     return array_merge(parent::convertToArray(), $result);
 }