Package org.example.ws_ht.api

Examples of org.example.ws_ht.api.TTask



        // I need to get the Content Data and check the values of the Emergency and Call Ids.
        // Using that I need to select one vehicle ID from the list of all the vehicles.

        TTask task = humanTaskServiceClient.getTaskInfo(taskAbstract.getId());
        assertNotNull(task);

        humanTaskServiceClient.setAuthorizedEntityId("garage_emergency_service");
        humanTaskServiceClient.start(task.getId());

        List<TAttachmentInfo> attachmentsInfo = humanTaskServiceClient.getAttachmentInfos(task.getId());
        TAttachmentInfo firstAttachmentInfo = attachmentsInfo.get(0);
        TAttachment attachment = humanTaskServiceClient.getAttachments(task.getId(), firstAttachmentInfo.getName()).get(0);

        String value = (String) ((Map) attachment.getValue()).get("Content");

        assertNotNull(value, "1,1");


        Map<String, Object> info = new HashMap<String, Object>();
        List<Vehicle> vehicles = new ArrayList<Vehicle>();
        Ambulance ambulance = new Ambulance("My Ambulance", new Date());
        String ambulanceId = trackingService.newVehicleId();
        ambulance.setId(ambulanceId);
        vehicles.add(ambulance);
        //ContextTrackingServiceImpl.getInstance().attachVehicle(, ambulanceId);
        info.put("emergency.vehicles", selectedVehicles);

        humanTaskServiceClient.complete(task.getId(), info);
    }
View Full Code Here

TOP

Related Classes of org.example.ws_ht.api.TTask

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.