-
Notifications
You must be signed in to change notification settings - Fork 1
/
.iex.exs
86 lines (73 loc) · 2.07 KB
/
.iex.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# alias Cain.Rest.Endpoint
# alias Cain.Rest
# alias Cain.Rest.Variable
# alias DecisionTable.PurchaseParticipation
# alias DecisionTable.MdcTolerance
# alias BusinessProcess.SettleClaim
# mdc = %{costEstimatePosition: %{"cost" => 242}}
# pp = %{purchasePrice: 5, purchaseParticipation: 5, pastMonthsSinceBeginningOfContract: 6}
# Cain.Endpoint.start_link()
alias Cain.ProcessInstance
alias Cain.Endpoint
alias Cain.Endpoint.{ExternalTask, ProcessDefinition}
# DoStuff.start_link
# v = %{sum: {123, :long}, test: "bar"}
a_i = %{
"processInstanceId" => "c02717c4-1763-11ea-bb61-0242ac110004",
"canceled" => true,
"sortBy" => "endTime",
"sortOrder" => "desc",
"activityType" => "callActivity"
}
v_i = %{
correct_device: true,
corrected_accessories: %{},
documents: [],
other_device_manufacturer: nil,
other_device_model: nil,
other_device_model_imei: nil,
other_device_model_serial_number: nil
}
is_long = fn term -> if term > 2147483647 || term < -2147483648 do true else false end end
# v_i = %{
# estimate_of_cost: [%{"cost" => 42424, "code" => "3010"}]
# }
spec = [
estimate_of_cost: :json
]
# GenServer.start_link(Cain.ExternalWorker,
# topic: "price_validation",
# polling_interval: :timer.seconds(1)
# )
eval = %{
purchase_price: 50000,
past_months_since_beginning_of_contract: 4,
purchase_participation: 15000
}
demo_body = %{
assignee: "Peter Parker",
candidate_users: "Peter Parker, Bruce Wayne, Harvey Dent, Clark Kent",
candidate_groups: "Repairer"
}
body = %{
contract_nr: "data.titan_claim.contract_nr",
brand: "data",
model: "data",
mediator_nr: "4865",
deductible_amount: 5,
max_compensation: 0,
fair_value: 5,
product_type: "KOMPLETTSCHUTZ_2019",
new_device: true,
past_months_since_beginning_of_contract: 4,
previous_claims_count: 1,
previous_claims_total: 4,
forced_inspection: true,
role_of_repairer: "stockist",
reporter_id: 12,
store_worker_candidates: "Peter Parker, Bruce Wayne",
repair_stores: "5444, 56666898, 422442",
repair_worker: "Peter Parker"
}
# DemoWorker.start_link()
# DoStuff.start_link()