processmaker/pmio-sdk-php

dev-master 2018-02-05 09:22 UTC

This package is auto-updated.

Last update: 2024-10-22 11:25:32 UTC


README

This ProcessMaker I/O API provides access to a BPMN 2.0 compliant workflow engine API that is designed to be used as a microservice to support enterprise cloud applications. The current Alpha 1.0 version supports most of the descriptive classes of the BPMN 2.0 specification.

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build date: 2017-10-30T20:11:02.634+02:00
  • Build package: class io.swagger.codegen.languages.PhpClientCodegen For more information, please visit https://www.processmaker.io/

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/ProcessMaker/pmio-sdk-php.git"
    }
  ],
  "require": {
    "ProcessMaker/pmio-sdk-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/pmio-sdk-php/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit lib/Tests

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: PasswordGrant
ProcessMaker\PMIO\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new ProcessMaker\PMIO\Api\Client();
$process_id = "process_id_example"; // string | ID of the process related to the event
$event_create_item = new \ProcessMaker\PMIO\Model\EventCreateItem(); // \ProcessMaker\PMIO\Model\EventCreateItem | JSON API response with the event object to add

try {
    $result = $api_instance->addEvent($process_id, $event_create_item);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Client->addEvent: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://CHANGEME.api.processmaker.io/api/v1

Documentation For Models

Documentation For Authorization

PasswordGrant

  • Type: OAuth
  • Flow: password
  • Authorization URL: /oauth/access_token
  • Scopes: N/A

Author

support@processmaker.io