Skip to content

Commit

Permalink
Merge pull request #5 from tistre/patch-1
Browse files Browse the repository at this point in the history
Fix ByKey methods missing /key/ in request URL
  • Loading branch information
HunterXuan authored Jun 5, 2020
2 parents 347349c + 55b9e53 commit 7c9cc08
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/Service/ProcessDefinitionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function getActivityInstanceStatisticsByKey(
$tenantId = '',
ProcessDefinitionRequest $processDefinitionRequest = null
) {
$url = '/process-definition/' . $processDefinitionKey;
$url = '/process-definition/key/' . $processDefinitionKey;
$url = $tenantId ? ($url . '/tenant-id/' . $tenantId) : $url;
$url = $url . '/statistics';

Expand All @@ -55,7 +55,7 @@ public function getDiagramById($processDefinitionId)

public function getDiagramByKey($processDefinitionKey, $tenantId = '')
{
$url = '/process-definition/' . $processDefinitionKey;
$url = '/process-definition/key/' . $processDefinitionKey;
$url = $tenantId ? ($url . '/tenant-id/' . $tenantId) : $url;
$url = $url . '/diagram';

Expand Down Expand Up @@ -85,7 +85,7 @@ public function getStartFormVariablesByKey(
$tenantId = '',
ProcessDefinitionRequest $processDefinitionRequest = null
) {
$url = '/process-definition/' . $processDefinitionKey;
$url = '/process-definition/key/' . $processDefinitionKey;
$url = $tenantId ? ($url . '/tenant-id/' . $tenantId) : $url;
$url = $url . '/form-variables';

Expand Down Expand Up @@ -132,7 +132,7 @@ public function getRenderedStartFormById($processDefinitionId)

public function getRenderedStartFormByKey($processDefinitionKey, $tenantId = '')
{
$url = '/process-definition/' . $processDefinitionKey;
$url = '/process-definition/key/' . $processDefinitionKey;
$url = $tenantId ? ($url . '/tenant-id/' . $tenantId) : $url;
$url = $url . '/rendered-form';

Expand All @@ -156,7 +156,7 @@ public function getStartFormKeyById($processDefinitionId)

public function getStartFormKeyByKey($processDefinitionKey, $tenantId = '')
{
$url = '/process-definition/' . $processDefinitionKey;
$url = '/process-definition/key/' . $processDefinitionKey;
$url = $tenantId ? ($url . '/tenant-id/' . $tenantId) : $url;
$url = $url . '/startForm';

Expand Down Expand Up @@ -191,7 +191,7 @@ public function getXMLById($processDefinitionId)

public function getXMLByKey($processDefinitionKey, $tenantId = '')
{
$url = '/process-definition/' . $processDefinitionKey;
$url = '/process-definition/key/' . $processDefinitionKey;
$url = $tenantId ? ($url . '/tenant-id/' . $tenantId) : $url;
$url = $url . '/xml';

Expand All @@ -215,7 +215,7 @@ public function getById($processDefinitionId)

public function getByKey($processDefinitionKey, $tenantId = '')
{
$url = '/process-definition/' . $processDefinitionKey;
$url = '/process-definition/key/' . $processDefinitionKey;
$url = $tenantId ? ($url . '/tenant-id/' . $tenantId) : $url;

$this->setRequestUrl($url)
Expand Down Expand Up @@ -244,7 +244,7 @@ public function startInstanceByKey(
$tenantId = '',
ProcessDefinitionRequest $processDefinitionRequest = null
) {
$url = '/process-definition/' . $processDefinitionKey;
$url = '/process-definition/key/' . $processDefinitionKey;
$url = $tenantId ? ($url . '/tenant-id/' . $tenantId) : $url;
$url = $url . '/start';

Expand Down Expand Up @@ -275,7 +275,7 @@ public function submitStartFormByKey(
$tenantId = '',
ProcessDefinitionRequest $processDefinitionRequest = null
) {
$url = '/process-definition/' . $processDefinitionKey;
$url = '/process-definition/key/' . $processDefinitionKey;
$url = $tenantId ? ($url . '/tenant-id/' . $tenantId) : $url;
$url = $url . '/submit-form';

Expand Down Expand Up @@ -306,7 +306,7 @@ public function activateOrSuspendByKey(
$tenantId = '',
ProcessDefinitionRequest $processDefinitionRequest = null
) {
$url = '/process-definition/' . $processDefinitionKey;
$url = '/process-definition/key/' . $processDefinitionKey;
$url = $tenantId ? ($url . '/tenant-id/' . $tenantId) : $url;
$url = $url . '/suspended';

Expand Down Expand Up @@ -337,7 +337,7 @@ public function updateHTTLByKey(
$tenantId = '',
ProcessDefinitionRequest $processDefinitionRequest = null
) {
$url = '/process-definition/' . $processDefinitionKey;
$url = '/process-definition/key/' . $processDefinitionKey;
$url = $tenantId ? ($url . '/tenant-id/' . $tenantId) : $url;
$url = $url . '/history-time-to-live';

Expand Down

0 comments on commit 7c9cc08

Please sign in to comment.