<h2>Inventory</h2>
<div class="control-group">
<label class="control-label" for="inventory">List of assets:</label>
<div class="controls">
<textarea form-field name="inventory" rows="5" readonly="true"></textarea>
</div>
</div>
Hello,
I've been researching for a while and I've found this:
https://groups.google.com/d/msg/camunda-bpm-users/AzC7-tkK15M/nSUsiH7_R7UJ
I guess my application would be case b-right (since I have a database for Camunda and another one for my data).
<div class="span12">
<div class="alert alert-info">${customerName} is currently doing task 23.</div>
</div>
You can reference the value of a process variable using the formVariable()
method:
The user {{formVariable('selectedName')}} should approve this request!
<div class="row-fluid" id="inventoryRoot" ng-app="inventoryApp">
<div class="span12">
<img src="https://www.google.se/images/srpr/logo11w.png" style="margin-top:10px; margin-bottom:30px" />
</div>
<div class="span12" >
<h2>Inventory</h2>
<div class="control-group">
<label class="control-label" for="inventory">List of assets:</label>
<div class="controls">
<!-- <textarea form-field name="inventory" rows="5" readonly="true"></textarea> -->
</div>
<ul>
<li ng-repeat="asset in assets">
There are {{asset}}.
</li>
</ul>
</div>
</div>
<script form-script type="text/form-script">
// create module and bootstrap it to the main app
var myApp = angular.module("inventoryApp", []);
angular.bootstrap(document.getElementById("inventoryApp"), ['tasklist']);
// get the module
myApp = angular.module("inventoryApp");
// add factory to module
myApp.factory('Inventory', ['$resource',
function($resource) {
return {getInv: function() {
$resource('URL_FROM_REST_SERVICE', {}, {
query: {method:'GET', isArray:true}
}
);
}}
}
]);
// call the function from Inventory with the $scope as argument
function getInventory($scope, Inventory) {
$scope.assets = Inventory.getInv();
}
// set assets in scope
getInventory();
</script>