Package org.kie.remote.client.jaxb

Examples of org.kie.remote.client.jaxb.JaxbCommandsRequest


        // Create JaxbCommandsRequest instance and add commands
        Command<?> cmd = new StartProcessCommand();
        ((StartProcessCommand) cmd).setProcessId(PROCESS_ID_1);
        int oompaProcessingResultIndex = 0;
        JaxbCommandsRequest req = new JaxbCommandsRequest(DEPLOYMENT_ID, cmd);
        cmd = new GetTaskAssignedAsPotentialOwnerCommand();
        ((GetTaskAssignedAsPotentialOwnerCommand) cmd).setUserId(USER);
        req.getCommands().add(cmd);
        int loompaMonitoringResultIndex = 1;

        // Get JNDI context from server
        InitialContext context = getRemoteJbossInitialContext(serverUrl, USER, PASSWORD);
           
View Full Code Here


    private JaxbCommandsRequest prepareCommandRequest( Command command ) {
        if( config.getDeploymentId() == null && !(command instanceof TaskCommand || command instanceof AuditCommand) ) {
            throw new MissingRequiredInfoException("A deployment id is required when sending commands involving the KieSession.");
        }
        JaxbCommandsRequest req;
        if( command instanceof AuditCommand ) {
            req = new JaxbCommandsRequest(command);
        } else {
            req = new JaxbCommandsRequest(config.getDeploymentId(), command);
        }

        Long processInstanceId = findProcessInstanceId(command);
        if( processInstanceId == null ) {
            processInstanceId = config.getProcessInstanceId();
        }
        req.setProcessInstanceId(processInstanceId);
        req.setUser(config.getUserName());
        req.setVersion(VERSION);

        return req;
    }
View Full Code Here

     *
     * @param command The {@link Command} object to be executed.
     * @return The result of the {@link Command} object execution.
     */
    private Object executeJmsCommand( Command command ) {
        JaxbCommandsRequest req = prepareCommandRequest(command);
        String deploymentId = config.getDeploymentId();

        ConnectionFactory factory = config.getConnectionFactory();
        Queue sendQueue;

View Full Code Here

     *
     * @param command The {@link Command} object to be executed.
     * @return The result of the {@link Command} object execution.
     */
    private <T> T executeRestCommand( Command command ) {
        JaxbCommandsRequest jaxbRequest = prepareCommandRequest(command);
        KieRemoteHttpRequest httpRequest = config.createHttpRequest().relativeRequest("/execute");
       
        // necessary for deserialization
        httpRequest.header(JaxbSerializationProvider.EXECUTE_DEPLOYMENT_ID_HEADER, config.getDeploymentId());

View Full Code Here

TOP

Related Classes of org.kie.remote.client.jaxb.JaxbCommandsRequest

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.