Skip to content

Instantly share code, notes, and snippets.

@yehara
Created September 28, 2011 09:23
Show Gist options
  • Save yehara/1247456 to your computer and use it in GitHub Desktop.
Save yehara/1247456 to your computer and use it in GitHub Desktop.
Questetra BPM Suite のメッセージ開始イベントを起動するサンプルコード(PHP)
<?php
require_once "HTTP/Client.php";
$client =& new HTTP_Client(array("useBrackets" => false));
$url = "https://s.questetra.net/00000000/System/Event/MessageStart/start";
$params = array(
"processModelInfoId" => "1",
"nodeNumber" => "0",
"key" => "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"title" => "件名です",
"data[0].input" => "文字列です",
"data[1].input" => 12345,
"data[2].selects" => array("1", "2"),
"data[3].input" => "2011-09-26",
"data[4].input" => "2011-09-26",
"data[4].time" => "12:34",
"data[6].email" => "SouthPole@questetra.com",
"data[7].console" => "掲示板型です",
"data[9].input" => "<list><row><col>文字</col><col>54321</col></row></list>"
);
$files = array(
array("data[5].upload", array("sample.png", "sample.gif"), array("image/png", "image/gif"))
);
$client->post($url, $params, false, $files);
$response = $client->currentResponse();
if($response["code"] == 200) {
// 成功
} else {
// エラーが返された場合
print_r($response);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment