質問編集履歴
16
一部削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
data = {}
|
24
24
|
|
25
|
-
#
|
25
|
+
# keyをキャメルケースに変換するfor文
|
26
26
|
|
27
27
|
for k,v in data_list.items():
|
28
28
|
|
15
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -41,3 +41,5 @@
|
|
41
41
|
[各要素のキーに対してforループ処理](https://note.nkmk.me/python-dict-keys-values-items/)
|
42
42
|
|
43
43
|
[キャメルケース変換](http://hatakazu.hatenablog.com/entry/2013/02/16/135911)
|
44
|
+
|
45
|
+
[dict辞書(forループ処理)](https://note.nkmk.me/python-dict-keys-values-items/)
|
14
削除できないので変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
c
|
1
|
+
[dict]for文をmap関数で表現
|
test
CHANGED
@@ -1,51 +1,43 @@
|
|
1
|
-
|
1
|
+
for文で記載した内容を、map表現に変更可能かどうか
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
```python
|
6
6
|
|
7
|
-
--
|
8
|
-
|
9
|
-
[Start Process Instance](https://docs.camunda.org/manual/latest/reference/rest/process-definition/post-start-process-instance/)
|
10
|
-
|
11
|
-
上記の、「POST /process-definition/key/{key}/start」を使用したいです。
|
12
|
-
|
13
|
-
|
7
|
+
import re
|
14
8
|
|
15
9
|
|
16
10
|
|
17
|
-
|
11
|
+
def camel(self):
|
18
12
|
|
19
|
-
|
13
|
+
return re.sub("_(.)",lambda x:x.group(1).upper(),tmp)
|
20
14
|
|
15
|
+
def cam(self):
|
16
|
+
|
17
|
+
# 中身
|
18
|
+
|
21
|
-
|
19
|
+
data_list = {'Kama_boko': 1, 'wA_ter': 2, 'thun_Der': 3}
|
20
|
+
|
21
|
+
# 空のlist
|
22
|
+
|
23
|
+
data = {}
|
24
|
+
|
25
|
+
# for文(keyをキャメルケースに変換するfor文)
|
26
|
+
|
27
|
+
for k,v in data_list.items():
|
28
|
+
|
29
|
+
data[self.camel(k)] = v
|
30
|
+
|
31
|
+
```
|
22
32
|
|
23
33
|
|
24
|
-
|
25
|
-
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H "Content-Type:application/json" -d '{}'`
|
26
|
-
|
27
|
-
→Status 400エラー(e.g., malformed request syntax, invalid request message framing, or deceptive request routing)
|
28
34
|
|
29
35
|
|
30
36
|
|
31
37
|
参考URL
|
32
38
|
|
33
|
-
---
|
34
|
-
|
35
|
-
[Camunda の REST API を試してみる](https://qiita.com/Masaaki_Inaba/items/01f63641da6e3f69388a)
|
36
|
-
|
37
|
-
[Start Process Instance](https://docs.camunda.org/manual/latest/reference/rest/process-definition/post-start-process-instance/)
|
38
|
-
|
39
|
-
[curlコマンドの使い方](https://viral-community.com/security/curl-8263/)
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
備考
|
44
|
-
|
45
39
|
--
|
46
40
|
|
47
|
-
|
41
|
+
[各要素のキーに対してforループ処理](https://note.nkmk.me/python-dict-keys-values-items/)
|
48
42
|
|
49
|
-
|
50
|
-
|
51
|
-
cr
|
43
|
+
[キャメルケース変換](http://hatakazu.hatenablog.com/entry/2013/02/16/135911)
|
13
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
RESTAPIを使用したいが、curlの記載方法がわからない。
|
2
2
|
|
3
3
|
|
4
4
|
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
上記の、「POST /process-definition/key/{key}/start」を使用したいです。
|
12
12
|
|
13
|
-
|
13
|
+
空josonを使用
|
14
14
|
|
15
15
|
|
16
16
|
|
12
修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
curlコマンドで
|
1
|
+
curlコマンドでRESTAPIをたたきたい。
|
test
CHANGED
File without changes
|
11
修正
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
10
不要箇所削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,17 +1,3 @@
|
|
1
|
-
最終的には、PythonからRequestsを使用してCamundaプロセスをキックしたいです。
|
2
|
-
|
3
|
-
上記を満たしたいのですが、そもそもcurlコマンドが動いていないです。
|
4
|
-
|
5
|
-
間違っているかもしれませんが、コマンドができたら,pythonにそれを組み込めばいいという認識でいます。
|
6
|
-
|
7
|
-
ですので、一旦crulコマンドを動作させたいです。
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
困っていること
|
12
|
-
|
13
|
-
--
|
14
|
-
|
15
1
|
CamundaのRESTAPI(POST /process-definition/key/{key}/start)を使用したいが、curlの記載方法がわからない。
|
16
2
|
|
17
3
|
|
@@ -24,13 +10,11 @@
|
|
24
10
|
|
25
11
|
上記の、「POST /process-definition/key/{key}/start」を使用したいです。
|
26
12
|
|
27
|
-
記載にRequest Bodyが記載されてて、何個か必須ってなってますが、コマンドにどう書けばいいのかわか
|
13
|
+
記載にRequest Bodyが記載されてて、何個か必須ってなってますが、コマンドにどう書けばいいのかわからないため、空josonを使用してます。
|
28
14
|
|
29
15
|
|
30
16
|
|
31
|
-
空josonでもありってあるので記載方法わからないので下のコマンドは全て空です…
|
32
|
-
|
33
|
-
試したコマンドを複数個記載いたします。全
|
17
|
+
試したコマンドを複数個記載いたします。全てエラーです。。
|
34
18
|
|
35
19
|
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H "ContentType:application/json" -d "{/""}/"`
|
36
20
|
|
@@ -38,7 +22,7 @@
|
|
38
22
|
|
39
23
|
|
40
24
|
|
41
|
-
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H
|
25
|
+
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H "Content-Type:application/json" -d '{}'`
|
42
26
|
|
43
27
|
→Status 400エラー(e.g., malformed request syntax, invalid request message framing, or deceptive request routing)
|
44
28
|
|
@@ -62,10 +46,6 @@
|
|
62
46
|
|
63
47
|
camundaは、Docker([Dockerhub](https://hub.docker.com/r/camunda/camunda-bpm-platform/))で動かしています。
|
64
48
|
|
65
|
-
camundaの中には、sample1,sample2,sample3のプロセスを作成/追加済です。
|
66
|
-
|
67
49
|
|
68
50
|
|
69
51
|
crlの初歩的なことかもしれず申し訳ないのですが、ご教示のほどお願いいたします。
|
70
|
-
|
71
|
-
コマンドができれば、なんとかPythonもできると思うので…よろしくお願いいたします。
|
9
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,19 +32,13 @@
|
|
32
32
|
|
33
33
|
試したコマンドを複数個記載いたします。全部エラーです。。
|
34
34
|
|
35
|
-
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “ContentType:application/json”`
|
36
|
-
|
37
|
-
→エラー:Status 400
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H
|
35
|
+
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H "ContentType:application/json" -d "{/""}/"`
|
42
36
|
|
43
37
|
→エラー:e.g., malformed request syntax, invalid request message framing, or deceptive request routing
|
44
38
|
|
45
39
|
|
46
40
|
|
47
|
-
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content-Type:application/json” -d '{
|
41
|
+
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content-Type:application/json” -d '{}'`
|
48
42
|
|
49
43
|
→Status 400エラー(e.g., malformed request syntax, invalid request message framing, or deceptive request routing)
|
50
44
|
|
@@ -72,8 +66,6 @@
|
|
72
66
|
|
73
67
|
|
74
68
|
|
75
|
-
めちゃくちゃ舌打ちと怒られたので、多分すごく簡単なことだと思います…申し訳ないです。。
|
76
|
-
|
77
69
|
crlの初歩的なことかもしれず申し訳ないのですが、ご教示のほどお願いいたします。
|
78
70
|
|
79
71
|
コマンドができれば、なんとかPythonもできると思うので…よろしくお願いいたします。
|
8
変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
curlコマンドでCamundaのRESTAPIをたたきたい。
|
test
CHANGED
File without changes
|
7
コマンド変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -44,9 +44,9 @@
|
|
44
44
|
|
45
45
|
|
46
46
|
|
47
|
-
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “ContentType:application/json” -d "{}
|
47
|
+
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content-Type:application/json” -d '{"startInstructions":{"type": "startAfterActivity"}}'`
|
48
48
|
|
49
|
-
→エラー
|
49
|
+
→Status 400エラー(e.g., malformed request syntax, invalid request message framing, or deceptive request routing)
|
50
50
|
|
51
51
|
|
52
52
|
|
6
文言変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
|
19
|
-
使用
|
19
|
+
使用したコマンド
|
20
20
|
|
21
21
|
--
|
22
22
|
|
5
文言変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
PythonからRequestsを使用してCamundaプロセスをキックしたいです。
|
1
|
+
最終的には、PythonからRequestsを使用してCamundaプロセスをキックしたいです。
|
2
2
|
|
3
3
|
上記を満たしたいのですが、そもそもcurlコマンドが動いていないです。
|
4
4
|
|
5
|
-
間違っているかもしれませんが、コマンドができたら,pythonにそれを組み込めばいいという認識でいます。
|
5
|
+
間違っているかもしれませんが、コマンドができたら,pythonにそれを組み込めばいいという認識でいます。
|
6
6
|
|
7
|
-
ですので、一旦crulコマンドを動作させたい
|
7
|
+
ですので、一旦crulコマンドを動作させたいです。
|
8
8
|
|
9
9
|
|
10
10
|
|
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
--
|
14
14
|
|
15
|
-
CamundaのRESTAPI(POST /process-definition/key/{key}/start)を使用したいが、curlの
|
15
|
+
CamundaのRESTAPI(POST /process-definition/key/{key}/start)を使用したいが、curlの記載方法がわからない。
|
16
16
|
|
17
17
|
|
18
18
|
|
@@ -74,6 +74,6 @@
|
|
74
74
|
|
75
75
|
めちゃくちゃ舌打ちと怒られたので、多分すごく簡単なことだと思います…申し訳ないです。。
|
76
76
|
|
77
|
-
crlの初歩的なことかもしれず申し訳ないのですが、
|
77
|
+
crlの初歩的なことかもしれず申し訳ないのですが、ご教示のほどお願いいたします。
|
78
78
|
|
79
79
|
コマンドができれば、なんとかPythonもできると思うので…よろしくお願いいたします。
|
4
変な改行修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,19 +32,19 @@
|
|
32
32
|
|
33
33
|
試したコマンドを複数個記載いたします。全部エラーです。。
|
34
34
|
|
35
|
-
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content
|
35
|
+
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “ContentType:application/json”`
|
36
36
|
|
37
37
|
→エラー:Status 400
|
38
38
|
|
39
39
|
|
40
40
|
|
41
|
-
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content
|
41
|
+
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “ContentType:application/json” -d "{/""}/"`
|
42
42
|
|
43
43
|
→エラー:e.g., malformed request syntax, invalid request message framing, or deceptive request routing
|
44
44
|
|
45
45
|
|
46
46
|
|
47
|
-
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content
|
47
|
+
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “ContentType:application/json” -d "{}"`
|
48
48
|
|
49
49
|
→エラー:e.g., malformed request syntax, invalid request message framing, or deceptive request routing
|
50
50
|
|
3
タイトル変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
【至急】
|
1
|
+
【至急】curlコマンドでCamundaのRESTAPIをたたきたい。
|
test
CHANGED
File without changes
|
2
追記
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
【至急】PythonからCamundaプロセスをキックしたい。コマンドの書き方がわからない。
|
1
|
+
【至急】PythonからCamundaプロセスをキックしたい。curlコマンドの書き方がわからない。
|
test
CHANGED
File without changes
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,7 +28,9 @@
|
|
28
28
|
|
29
29
|
|
30
30
|
|
31
|
+
空josonでもありってあるので記載方法わからないので下のコマンドは全て空です…
|
32
|
+
|
31
|
-
試したコマンド
|
33
|
+
試したコマンドを複数個記載いたします。全部エラーです。。
|
32
34
|
|
33
35
|
`curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H “Content-Type:application/json”`
|
34
36
|
|