processmaker/pmio-sdk-php

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

This package is auto-updated.

Last update: 2024-09-22 11:19:32 UTC


README

此ProcessMaker I/O API提供对符合BPMN 2.0规范的流程引擎API的访问,该API设计为微服务,以支持企业云应用。当前Alpha 1.0版本支持BPMN 2.0规范的大部分描述性类。

此PHP包由Swagger Codegen项目自动生成

  • API版本:1.0.0
  • 包版本:1.0.0
  • 构建日期:2017-10-30T20:11:02.634+02:00
  • 构建包:class io.swagger.codegen.languages.PhpClientCodegen。更多信息,请访问https://www.processmaker.io/

需求

PHP 5.4.0及更高版本

安装与使用

Composer

要通过Composer安装绑定,请将以下内容添加到composer.json

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

然后运行composer install

手动安装

下载文件并包含autoload.php

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

测试

要运行单元测试

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

入门指南

请按照安装程序进行操作,然后运行以下命令

<?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;
}

?>

API端点文档

所有URI都是相对于https://CHANGEME.api.processmaker.io/api/v1

模型文档

授权文档

密码授权

  • 类型: OAuth
  • 流程: 密码
  • 授权URL: /oauth/access_token
  • 作用域: 无

作者

support@processmaker.io