質問編集履歴

16

一部削除

2019/10/31 04:47

投稿

s_akira
s_akira

スコア15

test CHANGED
File without changes
test CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  data = {}
24
24
 
25
- # for文(keyをキャメルケースに変換するfor文)
25
+ # keyをキャメルケースに変換するfor文
26
26
 
27
27
  for k,v in data_list.items():
28
28
 

15

追記

2019/10/31 04:47

投稿

s_akira
s_akira

スコア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

削除できないので変更

2019/10/17 09:22

投稿

s_akira
s_akira

スコア15

test CHANGED
@@ -1 +1 @@
1
- curlコマンドRESTAPIをたたきたい。
1
+ [dict]for文をmap関数表現
test CHANGED
@@ -1,51 +1,43 @@
1
- RESTAPIを使用したいがcurlの記載方法がわらない。
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
- 空josonを使用
7
+ import re
14
8
 
15
9
 
16
10
 
17
- 試したコマンドを複数個記載いたします。全てエラーです。。
11
+ def camel(self):
18
12
 
19
- `curl -XPOST http://localhost:8080/engine-rest/process-definition/key/sample2/start -H "ContentType:application/json" -d "{/""}/"`
13
+ return re.sub("_(.)",lambda x:x.group(1).upper(),tmp)
20
14
 
15
+ def cam(self):
16
+
17
+ # 中身
18
+
21
- →エラー:e.g., malformed request syntax, invalid request message framing, or deceptive request routing
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
- camundaは、Docker([Dockerhub](https://hub.docker.com/r/camunda/camunda-bpm-platform/))で動かしています。
41
+ [各要素のキーに対してforループ処理](https://note.nkmk.me/python-dict-keys-values-items/)
48
42
 
49
-
50
-
51
- crlの初歩的なことかもしれず申し訳ないのですが、ご教示のほどお願いいたします。
43
+ [キャメルケース変換](http://hatakazu.hatenablog.com/entry/2013/02/16/135911)

13

修正

2019/10/17 09:08

投稿

s_akira
s_akira

スコア15

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,4 @@
1
- CamundaのRESTAPI(POST /process-definition/key/{key}/start)を使用したいが、curlの記載方法がわからない。
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
- 記載にRequest Bodyが記載されてて、何個か必須ってなってますが、コマンドにどう書けばいいのかわからないため、空josonを使用してます。
13
+ 空josonを使用
14
14
 
15
15
 
16
16
 

12

修正

2019/10/10 04:06

投稿

s_akira
s_akira

スコア15

test CHANGED
@@ -1 +1 @@
1
- curlコマンドでCamundaのRESTAPIをたたきたい。
1
+ curlコマンドでRESTAPIをたたきたい。
test CHANGED
File without changes

11

修正

2019/10/10 04:05

投稿

s_akira
s_akira

スコア15

test CHANGED
File without changes
test CHANGED
File without changes

10

不要箇所削除

2019/10/04 07:23

投稿

s_akira
s_akira

スコア15

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 Content-Type:application/json -d '{}'`
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

修正

2019/10/04 05:34

投稿

s_akira
s_akira

スコア15

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 ContentType:application/json -d "{/""}/"`
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 '{"startInstructions":{"type": "startAfterActivity"}}'`
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

変更

2019/10/03 09:51

投稿

s_akira
s_akira

スコア15

test CHANGED
@@ -1 +1 @@
1
- 【至急】curlコマンドでCamundaのRESTAPIをたたきたい。
1
+ curlコマンドでCamundaのRESTAPIをたたきたい。
test CHANGED
File without changes

7

コマンド変更

2019/10/03 09:26

投稿

s_akira
s_akira

スコア15

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
- →エラーe.g., malformed request syntax, invalid request message framing, or deceptive request routing
49
+ Status 400エラー(e.g., malformed request syntax, invalid request message framing, or deceptive request routing)
50
50
 
51
51
 
52
52
 

6

文言変更

2019/10/03 08:21

投稿

s_akira
s_akira

スコア15

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

文言変更

2019/10/03 07:22

投稿

s_akira
s_akira

スコア15

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

変な改行修正

2019/10/03 07:19

投稿

s_akira
s_akira

スコア15

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-Type:application/json”`
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-Type:application/json” -d "{/""}/"`
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-Type:application/json” -d "{}"`
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

タイトル変更

2019/10/03 07:17

投稿

s_akira
s_akira

スコア15

test CHANGED
@@ -1 +1 @@
1
- 【至急】PythonからCamundaプロセスキックしい。curlコマンドの書方がわからない。
1
+ 【至急】curlコマンドでCamundaのRESTAPIをたい。
test CHANGED
File without changes

2

追記

2019/10/03 07:10

投稿

s_akira
s_akira

スコア15

test CHANGED
@@ -1 +1 @@
1
- 【至急】PythonからCamundaプロセスをキックしたい。コマンドの書き方がわからない。
1
+ 【至急】PythonからCamundaプロセスをキックしたい。curlコマンドの書き方がわからない。
test CHANGED
File without changes

1

修正

2019/10/03 06:58

投稿

s_akira
s_akira

スコア15

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